<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - mbi.info - /usr/include/c++/4.4.1/bits/stl_tree.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../../../../index.html">directory</a> - <a href="index.html">usr/include/c++/4.4.1/bits</a> - stl_tree.h</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>mbi.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-01-23</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">207</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">87.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">180</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : // RB tree implementation -*- C++ -*-
<span class="lineNum">       2 </span>                : 
<span class="lineNum">       3 </span>                : // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
<span class="lineNum">       4 </span>                : // Free Software Foundation, Inc.
<span class="lineNum">       5 </span>                : //
<span class="lineNum">       6 </span>                : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       7 </span>                : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       8 </span>                : // terms of the GNU General Public License as published by the
<span class="lineNum">       9 </span>                : // Free Software Foundation; either version 3, or (at your option)
<span class="lineNum">      10 </span>                : // any later version.
<span class="lineNum">      11 </span>                : 
<span class="lineNum">      12 </span>                : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      13 </span>                : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      14 </span>                : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      15 </span>                : // GNU General Public License for more details.
<span class="lineNum">      16 </span>                : 
<span class="lineNum">      17 </span>                : // Under Section 7 of GPL version 3, you are granted additional
<span class="lineNum">      18 </span>                : // permissions described in the GCC Runtime Library Exception, version
<span class="lineNum">      19 </span>                : // 3.1, as published by the Free Software Foundation.
<span class="lineNum">      20 </span>                : 
<span class="lineNum">      21 </span>                : // You should have received a copy of the GNU General Public License and
<span class="lineNum">      22 </span>                : // a copy of the GCC Runtime Library Exception along with this program;
<span class="lineNum">      23 </span>                : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
<span class="lineNum">      24 </span>                : // &lt;http://www.gnu.org/licenses/&gt;.
<span class="lineNum">      25 </span>                : 
<span class="lineNum">      26 </span>                : /*
<span class="lineNum">      27 </span>                :  *
<span class="lineNum">      28 </span>                :  * Copyright (c) 1996,1997
<span class="lineNum">      29 </span>                :  * Silicon Graphics Computer Systems, Inc.
<span class="lineNum">      30 </span>                :  *
<span class="lineNum">      31 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      32 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      33 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      34 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      35 </span>                :  * in supporting documentation.  Silicon Graphics makes no
<span class="lineNum">      36 </span>                :  * representations about the suitability of this software for any
<span class="lineNum">      37 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      38 </span>                :  *
<span class="lineNum">      39 </span>                :  *
<span class="lineNum">      40 </span>                :  * Copyright (c) 1994
<span class="lineNum">      41 </span>                :  * Hewlett-Packard Company
<span class="lineNum">      42 </span>                :  *
<span class="lineNum">      43 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      44 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      45 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      46 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      47 </span>                :  * in supporting documentation.  Hewlett-Packard Company makes no
<span class="lineNum">      48 </span>                :  * representations about the suitability of this software for any
<span class="lineNum">      49 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      50 </span>                :  *
<span class="lineNum">      51 </span>                :  *
<span class="lineNum">      52 </span>                :  */
<span class="lineNum">      53 </span>                : 
<span class="lineNum">      54 </span>                : /** @file stl_tree.h
<span class="lineNum">      55 </span>                :  *  This is an internal header file, included by other library headers.
<span class="lineNum">      56 </span>                :  *  You should not attempt to use it directly.
<span class="lineNum">      57 </span>                :  */
<span class="lineNum">      58 </span>                : 
<span class="lineNum">      59 </span>                : #ifndef _STL_TREE_H
<span class="lineNum">      60 </span>                : #define _STL_TREE_H 1
<span class="lineNum">      61 </span>                : 
<span class="lineNum">      62 </span>                : #include &lt;bits/stl_algobase.h&gt;
<span class="lineNum">      63 </span>                : #include &lt;bits/allocator.h&gt;
<span class="lineNum">      64 </span>                : #include &lt;bits/stl_function.h&gt;
<span class="lineNum">      65 </span>                : #include &lt;bits/cpp_type_traits.h&gt;
<span class="lineNum">      66 </span>                : 
<span class="lineNum">      67 </span>                : _GLIBCXX_BEGIN_NAMESPACE(std)
<span class="lineNum">      68 </span>                : 
<span class="lineNum">      69 </span>                :   // Red-black tree class, designed for use in implementing STL
<span class="lineNum">      70 </span>                :   // associative containers (set, multiset, map, and multimap). The
<span class="lineNum">      71 </span>                :   // insertion and deletion algorithms are based on those in Cormen,
<span class="lineNum">      72 </span>                :   // Leiserson, and Rivest, Introduction to Algorithms (MIT Press,
<span class="lineNum">      73 </span>                :   // 1990), except that
<span class="lineNum">      74 </span>                :   //
<span class="lineNum">      75 </span>                :   // (1) the header cell is maintained with links not only to the root
<span class="lineNum">      76 </span>                :   // but also to the leftmost node of the tree, to enable constant
<span class="lineNum">      77 </span>                :   // time begin(), and to the rightmost node of the tree, to enable
<span class="lineNum">      78 </span>                :   // linear time performance when used with the generic set algorithms
<span class="lineNum">      79 </span>                :   // (set_union, etc.)
<span class="lineNum">      80 </span>                :   // 
<span class="lineNum">      81 </span>                :   // (2) when a node being deleted has two children its successor node
<span class="lineNum">      82 </span>                :   // is relinked into its place, rather than copied, so that the only
<span class="lineNum">      83 </span>                :   // iterators invalidated are those referring to the deleted node.
<span class="lineNum">      84 </span>                : 
<span class="lineNum">      85 </span>                :   enum _Rb_tree_color { _S_red = false, _S_black = true };
<span class="lineNum">      86 </span>                : 
<span class="lineNum">      87 </span>                :   struct _Rb_tree_node_base
<span class="lineNum">      88 </span>                :   {
<span class="lineNum">      89 </span>                :     typedef _Rb_tree_node_base* _Base_ptr;
<span class="lineNum">      90 </span>                :     typedef const _Rb_tree_node_base* _Const_Base_ptr;
<span class="lineNum">      91 </span>                : 
<span class="lineNum">      92 </span>                :     _Rb_tree_color      _M_color;
<span class="lineNum">      93 </span>                :     _Base_ptr           _M_parent;
<span class="lineNum">      94 </span>                :     _Base_ptr           _M_left;
<span class="lineNum">      95 </span>                :     _Base_ptr           _M_right;
<span class="lineNum">      96 </span>                : 
<span class="lineNum">      97 </span>                :     static _Base_ptr
<span class="lineNum">      98 </span>                :     _S_minimum(_Base_ptr __x)
<span class="lineNum">      99 </span>                :     {
<span class="lineNum">     100 </span>                :       while (__x-&gt;_M_left != 0) __x = __x-&gt;_M_left;
<span class="lineNum">     101 </span>                :       return __x;
<span class="lineNum">     102 </span>                :     }
<span class="lineNum">     103 </span>                : 
<span class="lineNum">     104 </span>                :     static _Const_Base_ptr
<span class="lineNum">     105 </span>                :     _S_minimum(_Const_Base_ptr __x)
<span class="lineNum">     106 </span>                :     {
<span class="lineNum">     107 </span>                :       while (__x-&gt;_M_left != 0) __x = __x-&gt;_M_left;
<span class="lineNum">     108 </span>                :       return __x;
<span class="lineNum">     109 </span>                :     }
<span class="lineNum">     110 </span>                : 
<span class="lineNum">     111 </span>                :     static _Base_ptr
<span class="lineNum">     112 </span>                :     _S_maximum(_Base_ptr __x)
<span class="lineNum">     113 </span>                :     {
<span class="lineNum">     114 </span>                :       while (__x-&gt;_M_right != 0) __x = __x-&gt;_M_right;
<span class="lineNum">     115 </span>                :       return __x;
<span class="lineNum">     116 </span>                :     }
<span class="lineNum">     117 </span>                : 
<span class="lineNum">     118 </span>                :     static _Const_Base_ptr
<span class="lineNum">     119 </span>                :     _S_maximum(_Const_Base_ptr __x)
<span class="lineNum">     120 </span>                :     {
<span class="lineNum">     121 </span>                :       while (__x-&gt;_M_right != 0) __x = __x-&gt;_M_right;
<span class="lineNum">     122 </span>                :       return __x;
<span class="lineNum">     123 </span>                :     }
<span class="lineNum">     124 </span>                :   };
<span class="lineNum">     125 </span>                : 
<span class="lineNum">     126 </span>                :   template&lt;typename _Val&gt;
<span class="lineNum">     127 </span>                :     struct _Rb_tree_node : public _Rb_tree_node_base
<span class="lineNum">     128 </span>                :     {
<span class="lineNum">     129 </span>                :       typedef _Rb_tree_node&lt;_Val&gt;* _Link_type;
<span class="lineNum">     130 </span>                :       _Val _M_value_field;
<span class="lineNum">     131 </span>                : 
<span class="lineNum">     132 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     133 </span>                :       template&lt;typename... _Args&gt;
<span class="lineNum">     134 </span>                :         _Rb_tree_node(_Args&amp;&amp;... __args)
<span class="lineNum">     135 </span>                :         : _Rb_tree_node_base(),
<span class="lineNum">     136 </span>                :           _M_value_field(std::forward&lt;_Args&gt;(__args)...) { }
<span class="lineNum">     137 </span>                : #endif
<span class="lineNum">     138 </span>                :     };
<span class="lineNum">     139 </span>                : 
<span class="lineNum">     140 </span>                :   _Rb_tree_node_base*
<span class="lineNum">     141 </span>                :   _Rb_tree_increment(_Rb_tree_node_base* __x);
<span class="lineNum">     142 </span>                : 
<span class="lineNum">     143 </span>                :   const _Rb_tree_node_base*
<span class="lineNum">     144 </span>                :   _Rb_tree_increment(const _Rb_tree_node_base* __x);
<span class="lineNum">     145 </span>                : 
<span class="lineNum">     146 </span>                :   _Rb_tree_node_base*
<span class="lineNum">     147 </span>                :   _Rb_tree_decrement(_Rb_tree_node_base* __x);
<span class="lineNum">     148 </span>                : 
<span class="lineNum">     149 </span>                :   const _Rb_tree_node_base*
<span class="lineNum">     150 </span>                :   _Rb_tree_decrement(const _Rb_tree_node_base* __x);
<span class="lineNum">     151 </span>                : 
<span class="lineNum">     152 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     153 </span>                :     struct _Rb_tree_iterator
<span class="lineNum">     154 </span>                :     {
<span class="lineNum">     155 </span>                :       typedef _Tp  value_type;
<span class="lineNum">     156 </span>                :       typedef _Tp&amp; reference;
<span class="lineNum">     157 </span>                :       typedef _Tp* pointer;
<span class="lineNum">     158 </span>                : 
<span class="lineNum">     159 </span>                :       typedef bidirectional_iterator_tag iterator_category;
<span class="lineNum">     160 </span>                :       typedef ptrdiff_t                  difference_type;
<span class="lineNum">     161 </span>                : 
<span class="lineNum">     162 </span>                :       typedef _Rb_tree_iterator&lt;_Tp&gt;        _Self;
<span class="lineNum">     163 </span>                :       typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
<span class="lineNum">     164 </span>                :       typedef _Rb_tree_node&lt;_Tp&gt;*           _Link_type;
<span class="lineNum">     165 </span>                : 
<span class="lineNum">     166 </span>                :       _Rb_tree_iterator()
<span class="lineNum">     167 </span>                :       : _M_node() { }
<span class="lineNum">     168 </span>                : 
<span class="lineNum">     169 </span>                :       explicit
<span class="lineNum">     170 </span><span class="lineCov">            408 :       _Rb_tree_iterator(_Link_type __x)</span>
<span class="lineNum">     171 </span><span class="lineCov">            408 :       : _M_node(__x) { }</span>
<span class="lineNum">     172 </span>                : 
<span class="lineNum">     173 </span>                :       reference
<span class="lineNum">     174 </span><span class="lineCov">            248 :       operator*() const</span>
<span class="lineNum">     175 </span><span class="lineCov">            248 :       { return static_cast&lt;_Link_type&gt;(_M_node)-&gt;_M_value_field; }</span>
<span class="lineNum">     176 </span>                : 
<span class="lineNum">     177 </span>                :       pointer
<span class="lineNum">     178 </span><span class="lineNoCov">              0 :       operator-&gt;() const</span>
<span class="lineNum">     179 </span><span class="lineNoCov">              0 :       { return &amp;static_cast&lt;_Link_type&gt;(_M_node)-&gt;_M_value_field; }</span>
<span class="lineNum">     180 </span>                : 
<span class="lineNum">     181 </span>                :       _Self&amp;
<span class="lineNum">     182 </span>                :       operator++()
<span class="lineNum">     183 </span>                :       {
<span class="lineNum">     184 </span>                :         _M_node = _Rb_tree_increment(_M_node);
<span class="lineNum">     185 </span>                :         return *this;
<span class="lineNum">     186 </span>                :       }
<span class="lineNum">     187 </span>                : 
<span class="lineNum">     188 </span>                :       _Self
<span class="lineNum">     189 </span><span class="lineCov">              9 :       operator++(int)</span>
<span class="lineNum">     190 </span>                :       {
<span class="lineNum">     191 </span><span class="lineCov">              9 :         _Self __tmp = *this;</span>
<span class="lineNum">     192 </span><span class="lineCov">              9 :         _M_node = _Rb_tree_increment(_M_node);</span>
<span class="lineNum">     193 </span><span class="lineCov">              9 :         return __tmp;</span>
<span class="lineNum">     194 </span>                :       }
<span class="lineNum">     195 </span>                : 
<span class="lineNum">     196 </span>                :       _Self&amp;
<span class="lineNum">     197 </span><span class="lineNoCov">              0 :       operator--()</span>
<span class="lineNum">     198 </span>                :       {
<span class="lineNum">     199 </span><span class="lineNoCov">              0 :         _M_node = _Rb_tree_decrement(_M_node);</span>
<span class="lineNum">     200 </span><span class="lineNoCov">              0 :         return *this;</span>
<span class="lineNum">     201 </span>                :       }
<span class="lineNum">     202 </span>                : 
<span class="lineNum">     203 </span>                :       _Self
<span class="lineNum">     204 </span>                :       operator--(int)
<span class="lineNum">     205 </span>                :       {
<span class="lineNum">     206 </span>                :         _Self __tmp = *this;
<span class="lineNum">     207 </span>                :         _M_node = _Rb_tree_decrement(_M_node);
<span class="lineNum">     208 </span>                :         return __tmp;
<span class="lineNum">     209 </span>                :       }
<span class="lineNum">     210 </span>                : 
<span class="lineNum">     211 </span>                :       bool
<span class="lineNum">     212 </span><span class="lineCov">            162 :       operator==(const _Self&amp; __x) const</span>
<span class="lineNum">     213 </span><span class="lineCov">            162 :       { return _M_node == __x._M_node; }</span>
<span class="lineNum">     214 </span>                : 
<span class="lineNum">     215 </span>                :       bool
<span class="lineNum">     216 </span><span class="lineCov">             18 :       operator!=(const _Self&amp; __x) const</span>
<span class="lineNum">     217 </span><span class="lineCov">             18 :       { return _M_node != __x._M_node; }</span>
<span class="lineNum">     218 </span>                : 
<span class="lineNum">     219 </span>                :       _Base_ptr _M_node;
<span class="lineNum">     220 </span>                :   };
<span class="lineNum">     221 </span>                : 
<span class="lineNum">     222 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     223 </span>                :     struct _Rb_tree_const_iterator
<span class="lineNum">     224 </span>                :     {
<span class="lineNum">     225 </span>                :       typedef _Tp        value_type;
<span class="lineNum">     226 </span>                :       typedef const _Tp&amp; reference;
<span class="lineNum">     227 </span>                :       typedef const _Tp* pointer;
<span class="lineNum">     228 </span>                : 
<span class="lineNum">     229 </span>                :       typedef _Rb_tree_iterator&lt;_Tp&gt; iterator;
<span class="lineNum">     230 </span>                : 
<span class="lineNum">     231 </span>                :       typedef bidirectional_iterator_tag iterator_category;
<span class="lineNum">     232 </span>                :       typedef ptrdiff_t                  difference_type;
<span class="lineNum">     233 </span>                : 
<span class="lineNum">     234 </span>                :       typedef _Rb_tree_const_iterator&lt;_Tp&gt;        _Self;
<span class="lineNum">     235 </span>                :       typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr;
<span class="lineNum">     236 </span>                :       typedef const _Rb_tree_node&lt;_Tp&gt;*           _Link_type;
<span class="lineNum">     237 </span>                : 
<span class="lineNum">     238 </span>                :       _Rb_tree_const_iterator()
<span class="lineNum">     239 </span>                :       : _M_node() { }
<span class="lineNum">     240 </span>                : 
<span class="lineNum">     241 </span>                :       explicit
<span class="lineNum">     242 </span><span class="lineCov">             78 :       _Rb_tree_const_iterator(_Link_type __x)</span>
<span class="lineNum">     243 </span><span class="lineCov">             78 :       : _M_node(__x) { }</span>
<span class="lineNum">     244 </span>                : 
<span class="lineNum">     245 </span><span class="lineCov">             51 :       _Rb_tree_const_iterator(const iterator&amp; __it)</span>
<span class="lineNum">     246 </span><span class="lineCov">             51 :       : _M_node(__it._M_node) { }</span>
<span class="lineNum">     247 </span>                : 
<span class="lineNum">     248 </span>                :       reference
<span class="lineNum">     249 </span><span class="lineCov">             78 :       operator*() const</span>
<span class="lineNum">     250 </span><span class="lineCov">             78 :       { return static_cast&lt;_Link_type&gt;(_M_node)-&gt;_M_value_field; }</span>
<span class="lineNum">     251 </span>                : 
<span class="lineNum">     252 </span>                :       pointer
<span class="lineNum">     253 </span>                :       operator-&gt;() const
<span class="lineNum">     254 </span>                :       { return &amp;static_cast&lt;_Link_type&gt;(_M_node)-&gt;_M_value_field; }
<span class="lineNum">     255 </span>                : 
<span class="lineNum">     256 </span>                :       _Self&amp;
<span class="lineNum">     257 </span><span class="lineCov">             78 :       operator++()</span>
<span class="lineNum">     258 </span>                :       {
<span class="lineNum">     259 </span><span class="lineCov">             78 :         _M_node = _Rb_tree_increment(_M_node);</span>
<span class="lineNum">     260 </span><span class="lineCov">             78 :         return *this;</span>
<span class="lineNum">     261 </span>                :       }
<span class="lineNum">     262 </span>                : 
<span class="lineNum">     263 </span>                :       _Self
<span class="lineNum">     264 </span>                :       operator++(int)
<span class="lineNum">     265 </span>                :       {
<span class="lineNum">     266 </span>                :         _Self __tmp = *this;
<span class="lineNum">     267 </span>                :         _M_node = _Rb_tree_increment(_M_node);
<span class="lineNum">     268 </span>                :         return __tmp;
<span class="lineNum">     269 </span>                :       }
<span class="lineNum">     270 </span>                : 
<span class="lineNum">     271 </span>                :       _Self&amp;
<span class="lineNum">     272 </span><span class="lineCov">             20 :       operator--()</span>
<span class="lineNum">     273 </span>                :       {
<span class="lineNum">     274 </span><span class="lineCov">             20 :         _M_node = _Rb_tree_decrement(_M_node);</span>
<span class="lineNum">     275 </span><span class="lineCov">             20 :         return *this;</span>
<span class="lineNum">     276 </span>                :       }
<span class="lineNum">     277 </span>                : 
<span class="lineNum">     278 </span>                :       _Self
<span class="lineNum">     279 </span>                :       operator--(int)
<span class="lineNum">     280 </span>                :       {
<span class="lineNum">     281 </span>                :         _Self __tmp = *this;
<span class="lineNum">     282 </span>                :         _M_node = _Rb_tree_decrement(_M_node);
<span class="lineNum">     283 </span>                :         return __tmp;
<span class="lineNum">     284 </span>                :       }
<span class="lineNum">     285 </span>                : 
<span class="lineNum">     286 </span>                :       bool
<span class="lineNum">     287 </span><span class="lineCov">            117 :       operator==(const _Self&amp; __x) const</span>
<span class="lineNum">     288 </span><span class="lineCov">            117 :       { return _M_node == __x._M_node; }</span>
<span class="lineNum">     289 </span>                : 
<span class="lineNum">     290 </span>                :       bool
<span class="lineNum">     291 </span>                :       operator!=(const _Self&amp; __x) const
<span class="lineNum">     292 </span>                :       { return _M_node != __x._M_node; }
<span class="lineNum">     293 </span>                : 
<span class="lineNum">     294 </span>                :       _Base_ptr _M_node;
<span class="lineNum">     295 </span>                :     };
<span class="lineNum">     296 </span>                : 
<span class="lineNum">     297 </span>                :   template&lt;typename _Val&gt;
<span class="lineNum">     298 </span>                :     inline bool
<span class="lineNum">     299 </span>                :     operator==(const _Rb_tree_iterator&lt;_Val&gt;&amp; __x,
<span class="lineNum">     300 </span>                :                const _Rb_tree_const_iterator&lt;_Val&gt;&amp; __y)
<span class="lineNum">     301 </span>                :     { return __x._M_node == __y._M_node; }
<span class="lineNum">     302 </span>                : 
<span class="lineNum">     303 </span>                :   template&lt;typename _Val&gt;
<span class="lineNum">     304 </span>                :     inline bool
<span class="lineNum">     305 </span>                :     operator!=(const _Rb_tree_iterator&lt;_Val&gt;&amp; __x,
<span class="lineNum">     306 </span>                :                const _Rb_tree_const_iterator&lt;_Val&gt;&amp; __y)
<span class="lineNum">     307 </span>                :     { return __x._M_node != __y._M_node; }
<span class="lineNum">     308 </span>                : 
<span class="lineNum">     309 </span>                :   void
<span class="lineNum">     310 </span>                :   _Rb_tree_insert_and_rebalance(const bool __insert_left,
<span class="lineNum">     311 </span>                :                                 _Rb_tree_node_base* __x,
<span class="lineNum">     312 </span>                :                                 _Rb_tree_node_base* __p,
<span class="lineNum">     313 </span>                :                                 _Rb_tree_node_base&amp; __header);
<span class="lineNum">     314 </span>                : 
<span class="lineNum">     315 </span>                :   _Rb_tree_node_base*
<span class="lineNum">     316 </span>                :   _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
<span class="lineNum">     317 </span>                :                                _Rb_tree_node_base&amp; __header);
<span class="lineNum">     318 </span>                : 
<span class="lineNum">     319 </span>                : 
<span class="lineNum">     320 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     321 </span>                :            typename _Compare, typename _Alloc = allocator&lt;_Val&gt; &gt;
<span class="lineNum">     322 </span>                :     class _Rb_tree
<span class="lineNum">     323 </span>                :     {
<span class="lineNum">     324 </span>                :       typedef typename _Alloc::template rebind&lt;_Rb_tree_node&lt;_Val&gt; &gt;::other
<span class="lineNum">     325 </span>                :               _Node_allocator;
<span class="lineNum">     326 </span>                : 
<span class="lineNum">     327 </span>                :     protected:
<span class="lineNum">     328 </span>                :       typedef _Rb_tree_node_base* _Base_ptr;
<span class="lineNum">     329 </span>                :       typedef const _Rb_tree_node_base* _Const_Base_ptr;
<span class="lineNum">     330 </span>                : 
<span class="lineNum">     331 </span>                :     public:
<span class="lineNum">     332 </span>                :       typedef _Key key_type;
<span class="lineNum">     333 </span>                :       typedef _Val value_type;
<span class="lineNum">     334 </span>                :       typedef value_type* pointer;
<span class="lineNum">     335 </span>                :       typedef const value_type* const_pointer;
<span class="lineNum">     336 </span>                :       typedef value_type&amp; reference;
<span class="lineNum">     337 </span>                :       typedef const value_type&amp; const_reference;
<span class="lineNum">     338 </span>                :       typedef _Rb_tree_node&lt;_Val&gt;* _Link_type;
<span class="lineNum">     339 </span>                :       typedef const _Rb_tree_node&lt;_Val&gt;* _Const_Link_type;
<span class="lineNum">     340 </span>                :       typedef size_t size_type;
<span class="lineNum">     341 </span>                :       typedef ptrdiff_t difference_type;
<span class="lineNum">     342 </span>                :       typedef _Alloc allocator_type;
<span class="lineNum">     343 </span>                : 
<span class="lineNum">     344 </span>                :       _Node_allocator&amp;
<span class="lineNum">     345 </span>                :       _M_get_Node_allocator()
<span class="lineNum">     346 </span>                :       { return *static_cast&lt;_Node_allocator*&gt;(&amp;this-&gt;_M_impl); }
<span class="lineNum">     347 </span>                :       
<span class="lineNum">     348 </span>                :       const _Node_allocator&amp;
<span class="lineNum">     349 </span><span class="lineCov">            106 :       _M_get_Node_allocator() const</span>
<span class="lineNum">     350 </span><span class="lineCov">            106 :       { return *static_cast&lt;const _Node_allocator*&gt;(&amp;this-&gt;_M_impl); }</span>
<span class="lineNum">     351 </span>                : 
<span class="lineNum">     352 </span>                :       allocator_type
<span class="lineNum">     353 </span><span class="lineCov">            106 :       get_allocator() const</span>
<span class="lineNum">     354 </span><span class="lineCov">            106 :       { return allocator_type(_M_get_Node_allocator()); }</span>
<span class="lineNum">     355 </span>                : 
<span class="lineNum">     356 </span>                :     protected:
<span class="lineNum">     357 </span>                :       _Link_type
<span class="lineNum">     358 </span><span class="lineCov">             62 :       _M_get_node()</span>
<span class="lineNum">     359 </span><span class="lineCov">             62 :       { return _M_impl._Node_allocator::allocate(1); }</span>
<span class="lineNum">     360 </span>                : 
<span class="lineNum">     361 </span>                :       void
<span class="lineNum">     362 </span><span class="lineCov">             44 :       _M_put_node(_Link_type __p)</span>
<span class="lineNum">     363 </span><span class="lineCov">             44 :       { _M_impl._Node_allocator::deallocate(__p, 1); }</span>
<span class="lineNum">     364 </span>                : 
<span class="lineNum">     365 </span>                : #ifndef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     366 </span>                :       _Link_type
<span class="lineNum">     367 </span><span class="lineCov">             62 :       _M_create_node(const value_type&amp; __x)</span>
<span class="lineNum">     368 </span>                :       {
<span class="lineNum">     369 </span><span class="lineCov">             62 :         _Link_type __tmp = _M_get_node();</span>
<span class="lineNum">     370 </span>                :         __try
<span class="lineNum">     371 </span><span class="lineCov">             62 :           { get_allocator().construct(&amp;__tmp-&gt;_M_value_field, __x); }</span>
<span class="lineNum">     372 </span><span class="lineNoCov">              0 :         __catch(...)</span>
<span class="lineNum">     373 </span>                :           {
<span class="lineNum">     374 </span><span class="lineNoCov">              0 :             _M_put_node(__tmp);</span>
<span class="lineNum">     375 </span><span class="lineNoCov">              0 :             __throw_exception_again;</span>
<span class="lineNum">     376 </span>                :           }
<span class="lineNum">     377 </span><span class="lineCov">             62 :         return __tmp;</span>
<span class="lineNum">     378 </span>                :       }
<span class="lineNum">     379 </span>                : 
<span class="lineNum">     380 </span>                :       void
<span class="lineNum">     381 </span><span class="lineCov">             44 :       _M_destroy_node(_Link_type __p)</span>
<span class="lineNum">     382 </span>                :       {
<span class="lineNum">     383 </span><span class="lineCov">             44 :         get_allocator().destroy(&amp;__p-&gt;_M_value_field);</span>
<span class="lineNum">     384 </span><span class="lineCov">             44 :         _M_put_node(__p);</span>
<span class="lineNum">     385 </span><span class="lineCov">             44 :       }</span>
<span class="lineNum">     386 </span>                : #else
<span class="lineNum">     387 </span>                :       template&lt;typename... _Args&gt;
<span class="lineNum">     388 </span>                :         _Link_type
<span class="lineNum">     389 </span>                :         _M_create_node(_Args&amp;&amp;... __args)
<span class="lineNum">     390 </span>                :         {
<span class="lineNum">     391 </span>                :           _Link_type __tmp = _M_get_node();
<span class="lineNum">     392 </span>                :           __try
<span class="lineNum">     393 </span>                :             {
<span class="lineNum">     394 </span>                :               _M_get_Node_allocator().construct(__tmp,
<span class="lineNum">     395 </span>                :                                              std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">     396 </span>                :             }
<span class="lineNum">     397 </span>                :           __catch(...)
<span class="lineNum">     398 </span>                :             {
<span class="lineNum">     399 </span>                :               _M_put_node(__tmp);
<span class="lineNum">     400 </span>                :               __throw_exception_again;
<span class="lineNum">     401 </span>                :             }
<span class="lineNum">     402 </span>                :           return __tmp;
<span class="lineNum">     403 </span>                :         }
<span class="lineNum">     404 </span>                : 
<span class="lineNum">     405 </span>                :       void
<span class="lineNum">     406 </span>                :       _M_destroy_node(_Link_type __p)
<span class="lineNum">     407 </span>                :       {
<span class="lineNum">     408 </span>                :         _M_get_Node_allocator().destroy(__p);
<span class="lineNum">     409 </span>                :         _M_put_node(__p);
<span class="lineNum">     410 </span>                :       }
<span class="lineNum">     411 </span>                : #endif
<span class="lineNum">     412 </span>                : 
<span class="lineNum">     413 </span>                :       _Link_type
<span class="lineNum">     414 </span>                :       _M_clone_node(_Const_Link_type __x)
<span class="lineNum">     415 </span>                :       {
<span class="lineNum">     416 </span>                :         _Link_type __tmp = _M_create_node(__x-&gt;_M_value_field);
<span class="lineNum">     417 </span>                :         __tmp-&gt;_M_color = __x-&gt;_M_color;
<span class="lineNum">     418 </span>                :         __tmp-&gt;_M_left = 0;
<span class="lineNum">     419 </span>                :         __tmp-&gt;_M_right = 0;
<span class="lineNum">     420 </span>                :         return __tmp;
<span class="lineNum">     421 </span>                :       }
<span class="lineNum">     422 </span>                : 
<span class="lineNum">     423 </span>                :     protected:
<span class="lineNum">     424 </span>                :       template&lt;typename _Key_compare, 
<span class="lineNum">     425 </span>                :                bool _Is_pod_comparator = __is_pod(_Key_compare)&gt;
<span class="lineNum">     426 </span>                :         struct _Rb_tree_impl : public _Node_allocator
<span class="lineNum">     427 </span><span class="lineCov">              8 :         {</span>
<span class="lineNum">     428 </span>                :           _Key_compare          _M_key_compare;
<span class="lineNum">     429 </span>                :           _Rb_tree_node_base    _M_header;
<span class="lineNum">     430 </span>                :           size_type             _M_node_count; // Keeps track of size of tree.
<span class="lineNum">     431 </span>                : 
<span class="lineNum">     432 </span><span class="lineCov">              8 :           _Rb_tree_impl()</span>
<span class="lineNum">     433 </span>                :           : _Node_allocator(), _M_key_compare(), _M_header(),
<span class="lineNum">     434 </span><span class="lineCov">              8 :             _M_node_count(0)</span>
<span class="lineNum">     435 </span><span class="lineCov">              8 :           { _M_initialize(); }</span>
<span class="lineNum">     436 </span>                : 
<span class="lineNum">     437 </span>                :           _Rb_tree_impl(const _Key_compare&amp; __comp, const _Node_allocator&amp; __a)
<span class="lineNum">     438 </span>                :           : _Node_allocator(__a), _M_key_compare(__comp), _M_header(),
<span class="lineNum">     439 </span>                :             _M_node_count(0)
<span class="lineNum">     440 </span>                :           { _M_initialize(); }
<span class="lineNum">     441 </span>                : 
<span class="lineNum">     442 </span>                :         private:
<span class="lineNum">     443 </span>                :           void
<span class="lineNum">     444 </span><span class="lineCov">              8 :           _M_initialize()</span>
<span class="lineNum">     445 </span>                :           {
<span class="lineNum">     446 </span><span class="lineCov">              8 :             this-&gt;_M_header._M_color = _S_red;</span>
<span class="lineNum">     447 </span><span class="lineCov">              8 :             this-&gt;_M_header._M_parent = 0;</span>
<span class="lineNum">     448 </span><span class="lineCov">              8 :             this-&gt;_M_header._M_left = &amp;this-&gt;_M_header;</span>
<span class="lineNum">     449 </span><span class="lineCov">              8 :             this-&gt;_M_header._M_right = &amp;this-&gt;_M_header;</span>
<span class="lineNum">     450 </span><span class="lineCov">              8 :           }         </span>
<span class="lineNum">     451 </span>                :         };
<span class="lineNum">     452 </span>                : 
<span class="lineNum">     453 </span>                :       _Rb_tree_impl&lt;_Compare&gt; _M_impl;
<span class="lineNum">     454 </span>                : 
<span class="lineNum">     455 </span>                :     protected:
<span class="lineNum">     456 </span>                :       _Base_ptr&amp;
<span class="lineNum">     457 </span><span class="lineCov">              4 :       _M_root()</span>
<span class="lineNum">     458 </span><span class="lineCov">              4 :       { return this-&gt;_M_impl._M_header._M_parent; }</span>
<span class="lineNum">     459 </span>                : 
<span class="lineNum">     460 </span>                :       _Const_Base_ptr
<span class="lineNum">     461 </span>                :       _M_root() const
<span class="lineNum">     462 </span>                :       { return this-&gt;_M_impl._M_header._M_parent; }
<span class="lineNum">     463 </span>                : 
<span class="lineNum">     464 </span>                :       _Base_ptr&amp;
<span class="lineNum">     465 </span><span class="lineCov">             36 :       _M_leftmost()</span>
<span class="lineNum">     466 </span><span class="lineCov">             36 :       { return this-&gt;_M_impl._M_header._M_left; }</span>
<span class="lineNum">     467 </span>                : 
<span class="lineNum">     468 </span>                :       _Const_Base_ptr
<span class="lineNum">     469 </span>                :       _M_leftmost() const
<span class="lineNum">     470 </span>                :       { return this-&gt;_M_impl._M_header._M_left; }
<span class="lineNum">     471 </span>                : 
<span class="lineNum">     472 </span>                :       _Base_ptr&amp;
<span class="lineNum">     473 </span><span class="lineCov">             38 :       _M_rightmost()</span>
<span class="lineNum">     474 </span><span class="lineCov">             38 :       { return this-&gt;_M_impl._M_header._M_right; }</span>
<span class="lineNum">     475 </span>                : 
<span class="lineNum">     476 </span>                :       _Const_Base_ptr
<span class="lineNum">     477 </span>                :       _M_rightmost() const
<span class="lineNum">     478 </span>                :       { return this-&gt;_M_impl._M_header._M_right; }
<span class="lineNum">     479 </span>                : 
<span class="lineNum">     480 </span>                :       _Link_type
<span class="lineNum">     481 </span><span class="lineCov">            174 :       _M_begin()</span>
<span class="lineNum">     482 </span><span class="lineCov">            174 :       { return static_cast&lt;_Link_type&gt;(this-&gt;_M_impl._M_header._M_parent); }</span>
<span class="lineNum">     483 </span>                : 
<span class="lineNum">     484 </span>                :       _Const_Link_type
<span class="lineNum">     485 </span>                :       _M_begin() const
<span class="lineNum">     486 </span>                :       {
<span class="lineNum">     487 </span>                :         return static_cast&lt;_Const_Link_type&gt;
<span class="lineNum">     488 </span>                :           (this-&gt;_M_impl._M_header._M_parent);
<span class="lineNum">     489 </span>                :       }
<span class="lineNum">     490 </span>                : 
<span class="lineNum">     491 </span>                :       _Link_type
<span class="lineNum">     492 </span><span class="lineCov">            263 :       _M_end()</span>
<span class="lineNum">     493 </span><span class="lineCov">            263 :       { return static_cast&lt;_Link_type&gt;(&amp;this-&gt;_M_impl._M_header); }</span>
<span class="lineNum">     494 </span>                : 
<span class="lineNum">     495 </span>                :       _Const_Link_type
<span class="lineNum">     496 </span>                :       _M_end() const
<span class="lineNum">     497 </span>                :       { return static_cast&lt;_Const_Link_type&gt;(&amp;this-&gt;_M_impl._M_header); }
<span class="lineNum">     498 </span>                : 
<span class="lineNum">     499 </span>                :       static const_reference
<span class="lineNum">     500 </span><span class="lineCov">            409 :       _S_value(_Const_Link_type __x)</span>
<span class="lineNum">     501 </span><span class="lineCov">            409 :       { return __x-&gt;_M_value_field; }</span>
<span class="lineNum">     502 </span>                : 
<span class="lineNum">     503 </span>                :       static const _Key&amp;
<span class="lineNum">     504 </span><span class="lineCov">            409 :       _S_key(_Const_Link_type __x)</span>
<span class="lineNum">     505 </span><span class="lineCov">            409 :       { return _KeyOfValue()(_S_value(__x)); }</span>
<span class="lineNum">     506 </span>                : 
<span class="lineNum">     507 </span>                :       static _Link_type
<span class="lineNum">     508 </span><span class="lineCov">            210 :       _S_left(_Base_ptr __x)</span>
<span class="lineNum">     509 </span><span class="lineCov">            210 :       { return static_cast&lt;_Link_type&gt;(__x-&gt;_M_left); }</span>
<span class="lineNum">     510 </span>                : 
<span class="lineNum">     511 </span>                :       static _Const_Link_type
<span class="lineNum">     512 </span>                :       _S_left(_Const_Base_ptr __x)
<span class="lineNum">     513 </span>                :       { return static_cast&lt;_Const_Link_type&gt;(__x-&gt;_M_left); }
<span class="lineNum">     514 </span>                : 
<span class="lineNum">     515 </span>                :       static _Link_type
<span class="lineNum">     516 </span><span class="lineCov">            262 :       _S_right(_Base_ptr __x)</span>
<span class="lineNum">     517 </span><span class="lineCov">            262 :       { return static_cast&lt;_Link_type&gt;(__x-&gt;_M_right); }</span>
<span class="lineNum">     518 </span>                : 
<span class="lineNum">     519 </span>                :       static _Const_Link_type
<span class="lineNum">     520 </span><span class="lineCov">             20 :       _S_right(_Const_Base_ptr __x)</span>
<span class="lineNum">     521 </span><span class="lineCov">             20 :       { return static_cast&lt;_Const_Link_type&gt;(__x-&gt;_M_right); }</span>
<span class="lineNum">     522 </span>                : 
<span class="lineNum">     523 </span>                :       static const_reference
<span class="lineNum">     524 </span><span class="lineCov">            108 :       _S_value(_Const_Base_ptr __x)</span>
<span class="lineNum">     525 </span><span class="lineCov">            108 :       { return static_cast&lt;_Const_Link_type&gt;(__x)-&gt;_M_value_field; }</span>
<span class="lineNum">     526 </span>                : 
<span class="lineNum">     527 </span>                :       static const _Key&amp;
<span class="lineNum">     528 </span><span class="lineCov">            108 :       _S_key(_Const_Base_ptr __x)</span>
<span class="lineNum">     529 </span><span class="lineCov">            108 :       { return _KeyOfValue()(_S_value(__x)); }</span>
<span class="lineNum">     530 </span>                : 
<span class="lineNum">     531 </span>                :       static _Base_ptr
<span class="lineNum">     532 </span>                :       _S_minimum(_Base_ptr __x)
<span class="lineNum">     533 </span>                :       { return _Rb_tree_node_base::_S_minimum(__x); }
<span class="lineNum">     534 </span>                : 
<span class="lineNum">     535 </span>                :       static _Const_Base_ptr
<span class="lineNum">     536 </span>                :       _S_minimum(_Const_Base_ptr __x)
<span class="lineNum">     537 </span>                :       { return _Rb_tree_node_base::_S_minimum(__x); }
<span class="lineNum">     538 </span>                : 
<span class="lineNum">     539 </span>                :       static _Base_ptr
<span class="lineNum">     540 </span>                :       _S_maximum(_Base_ptr __x)
<span class="lineNum">     541 </span>                :       { return _Rb_tree_node_base::_S_maximum(__x); }
<span class="lineNum">     542 </span>                : 
<span class="lineNum">     543 </span>                :       static _Const_Base_ptr
<span class="lineNum">     544 </span>                :       _S_maximum(_Const_Base_ptr __x)
<span class="lineNum">     545 </span>                :       { return _Rb_tree_node_base::_S_maximum(__x); }
<span class="lineNum">     546 </span>                : 
<span class="lineNum">     547 </span>                :     public:
<span class="lineNum">     548 </span>                :       typedef _Rb_tree_iterator&lt;value_type&gt;       iterator;
<span class="lineNum">     549 </span>                :       typedef _Rb_tree_const_iterator&lt;value_type&gt; const_iterator;
<span class="lineNum">     550 </span>                : 
<span class="lineNum">     551 </span>                :       typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;
<span class="lineNum">     552 </span>                :       typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
<span class="lineNum">     553 </span>                : 
<span class="lineNum">     554 </span>                :     private:
<span class="lineNum">     555 </span>                :       iterator
<span class="lineNum">     556 </span>                :       _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y,
<span class="lineNum">     557 </span>                :                  const value_type&amp; __v);
<span class="lineNum">     558 </span>                : 
<span class="lineNum">     559 </span>                :       // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">     560 </span>                :       // 233. Insertion hints in associative containers.
<span class="lineNum">     561 </span>                :       iterator
<span class="lineNum">     562 </span>                :       _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type&amp; __v);
<span class="lineNum">     563 </span>                : 
<span class="lineNum">     564 </span>                :       iterator
<span class="lineNum">     565 </span>                :       _M_insert_equal_lower(const value_type&amp; __x);
<span class="lineNum">     566 </span>                : 
<span class="lineNum">     567 </span>                :       _Link_type
<span class="lineNum">     568 </span>                :       _M_copy(_Const_Link_type __x, _Link_type __p);
<span class="lineNum">     569 </span>                : 
<span class="lineNum">     570 </span>                :       void
<span class="lineNum">     571 </span>                :       _M_erase(_Link_type __x);
<span class="lineNum">     572 </span>                : 
<span class="lineNum">     573 </span>                :       iterator
<span class="lineNum">     574 </span>                :       _M_lower_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">     575 </span>                :                      const _Key&amp; __k);
<span class="lineNum">     576 </span>                : 
<span class="lineNum">     577 </span>                :       const_iterator
<span class="lineNum">     578 </span>                :       _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">     579 </span>                :                      const _Key&amp; __k) const;
<span class="lineNum">     580 </span>                : 
<span class="lineNum">     581 </span>                :       iterator
<span class="lineNum">     582 </span>                :       _M_upper_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">     583 </span>                :                      const _Key&amp; __k);
<span class="lineNum">     584 </span>                : 
<span class="lineNum">     585 </span>                :       const_iterator
<span class="lineNum">     586 </span>                :       _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">     587 </span>                :                      const _Key&amp; __k) const;
<span class="lineNum">     588 </span>                : 
<span class="lineNum">     589 </span>                :     public:
<span class="lineNum">     590 </span>                :       // allocation/deallocation
<span class="lineNum">     591 </span><span class="lineCov">              8 :       _Rb_tree() { }</span>
<span class="lineNum">     592 </span>                : 
<span class="lineNum">     593 </span>                :       _Rb_tree(const _Compare&amp; __comp,
<span class="lineNum">     594 </span>                :                const allocator_type&amp; __a = allocator_type())
<span class="lineNum">     595 </span>                :       : _M_impl(__comp, __a) { }
<span class="lineNum">     596 </span>                : 
<span class="lineNum">     597 </span>                :       _Rb_tree(const _Rb_tree&amp; __x)
<span class="lineNum">     598 </span>                :       : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
<span class="lineNum">     599 </span>                :       {
<span class="lineNum">     600 </span>                :         if (__x._M_root() != 0)
<span class="lineNum">     601 </span>                :           {
<span class="lineNum">     602 </span>                :             _M_root() = _M_copy(__x._M_begin(), _M_end());
<span class="lineNum">     603 </span>                :             _M_leftmost() = _S_minimum(_M_root());
<span class="lineNum">     604 </span>                :             _M_rightmost() = _S_maximum(_M_root());
<span class="lineNum">     605 </span>                :             _M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">     606 </span>                :           }
<span class="lineNum">     607 </span>                :       }
<span class="lineNum">     608 </span>                : 
<span class="lineNum">     609 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     610 </span>                :       _Rb_tree(_Rb_tree&amp;&amp; __x);
<span class="lineNum">     611 </span>                : #endif
<span class="lineNum">     612 </span>                : 
<span class="lineNum">     613 </span><span class="lineCov">              8 :       ~_Rb_tree()</span>
<span class="lineNum">     614 </span><span class="lineCov">              8 :       { _M_erase(_M_begin()); }</span>
<span class="lineNum">     615 </span>                : 
<span class="lineNum">     616 </span>                :       _Rb_tree&amp;
<span class="lineNum">     617 </span>                :       operator=(const _Rb_tree&amp; __x);
<span class="lineNum">     618 </span>                : 
<span class="lineNum">     619 </span>                :       // Accessors.
<span class="lineNum">     620 </span>                :       _Compare
<span class="lineNum">     621 </span><span class="lineCov">            107 :       key_comp() const</span>
<span class="lineNum">     622 </span><span class="lineCov">            107 :       { return _M_impl._M_key_compare; }</span>
<span class="lineNum">     623 </span>                : 
<span class="lineNum">     624 </span>                :       iterator
<span class="lineNum">     625 </span><span class="lineCov">             32 :       begin()</span>
<span class="lineNum">     626 </span>                :       { 
<span class="lineNum">     627 </span>                :         return iterator(static_cast&lt;_Link_type&gt;
<span class="lineNum">     628 </span><span class="lineCov">             32 :                         (this-&gt;_M_impl._M_header._M_left));</span>
<span class="lineNum">     629 </span>                :       }
<span class="lineNum">     630 </span>                : 
<span class="lineNum">     631 </span>                :       const_iterator
<span class="lineNum">     632 </span><span class="lineCov">             39 :       begin() const</span>
<span class="lineNum">     633 </span>                :       { 
<span class="lineNum">     634 </span>                :         return const_iterator(static_cast&lt;_Const_Link_type&gt;
<span class="lineNum">     635 </span><span class="lineCov">             39 :                               (this-&gt;_M_impl._M_header._M_left));</span>
<span class="lineNum">     636 </span>                :       }
<span class="lineNum">     637 </span>                : 
<span class="lineNum">     638 </span>                :       iterator
<span class="lineNum">     639 </span><span class="lineCov">            141 :       end()</span>
<span class="lineNum">     640 </span><span class="lineCov">            141 :       { return iterator(static_cast&lt;_Link_type&gt;(&amp;this-&gt;_M_impl._M_header)); }</span>
<span class="lineNum">     641 </span>                : 
<span class="lineNum">     642 </span>                :       const_iterator
<span class="lineNum">     643 </span><span class="lineCov">             39 :       end() const</span>
<span class="lineNum">     644 </span>                :       { 
<span class="lineNum">     645 </span>                :         return const_iterator(static_cast&lt;_Const_Link_type&gt;
<span class="lineNum">     646 </span><span class="lineCov">             39 :                               (&amp;this-&gt;_M_impl._M_header));</span>
<span class="lineNum">     647 </span>                :       }
<span class="lineNum">     648 </span>                : 
<span class="lineNum">     649 </span>                :       reverse_iterator
<span class="lineNum">     650 </span>                :       rbegin()
<span class="lineNum">     651 </span>                :       { return reverse_iterator(end()); }
<span class="lineNum">     652 </span>                : 
<span class="lineNum">     653 </span>                :       const_reverse_iterator
<span class="lineNum">     654 </span>                :       rbegin() const
<span class="lineNum">     655 </span>                :       { return const_reverse_iterator(end()); }
<span class="lineNum">     656 </span>                : 
<span class="lineNum">     657 </span>                :       reverse_iterator
<span class="lineNum">     658 </span>                :       rend()
<span class="lineNum">     659 </span>                :       { return reverse_iterator(begin()); }
<span class="lineNum">     660 </span>                : 
<span class="lineNum">     661 </span>                :       const_reverse_iterator
<span class="lineNum">     662 </span>                :       rend() const
<span class="lineNum">     663 </span>                :       { return const_reverse_iterator(begin()); }
<span class="lineNum">     664 </span>                : 
<span class="lineNum">     665 </span>                :       bool
<span class="lineNum">     666 </span><span class="lineCov">             13 :       empty() const</span>
<span class="lineNum">     667 </span><span class="lineCov">             13 :       { return _M_impl._M_node_count == 0; }</span>
<span class="lineNum">     668 </span>                : 
<span class="lineNum">     669 </span>                :       size_type
<span class="lineNum">     670 </span><span class="lineCov">             45 :       size() const</span>
<span class="lineNum">     671 </span><span class="lineCov">             45 :       { return _M_impl._M_node_count; }</span>
<span class="lineNum">     672 </span>                : 
<span class="lineNum">     673 </span>                :       size_type
<span class="lineNum">     674 </span>                :       max_size() const
<span class="lineNum">     675 </span>                :       { return _M_get_Node_allocator().max_size(); }
<span class="lineNum">     676 </span>                : 
<span class="lineNum">     677 </span>                :       void
<span class="lineNum">     678 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     679 </span>                :       swap(_Rb_tree&amp;&amp; __t);
<span class="lineNum">     680 </span>                : #else
<span class="lineNum">     681 </span>                :       swap(_Rb_tree&amp; __t);      
<span class="lineNum">     682 </span>                : #endif
<span class="lineNum">     683 </span>                : 
<span class="lineNum">     684 </span>                :       // Insert/erase.
<span class="lineNum">     685 </span>                :       pair&lt;iterator, bool&gt;
<span class="lineNum">     686 </span>                :       _M_insert_unique(const value_type&amp; __x);
<span class="lineNum">     687 </span>                : 
<span class="lineNum">     688 </span>                :       iterator
<span class="lineNum">     689 </span>                :       _M_insert_equal(const value_type&amp; __x);
<span class="lineNum">     690 </span>                : 
<span class="lineNum">     691 </span>                :       iterator
<span class="lineNum">     692 </span>                :       _M_insert_unique_(const_iterator __position, const value_type&amp; __x);
<span class="lineNum">     693 </span>                : 
<span class="lineNum">     694 </span>                :       iterator
<span class="lineNum">     695 </span>                :       _M_insert_equal_(const_iterator __position, const value_type&amp; __x);
<span class="lineNum">     696 </span>                : 
<span class="lineNum">     697 </span>                :       template&lt;typename _InputIterator&gt;
<span class="lineNum">     698 </span>                :         void
<span class="lineNum">     699 </span>                :         _M_insert_unique(_InputIterator __first, _InputIterator __last);
<span class="lineNum">     700 </span>                : 
<span class="lineNum">     701 </span>                :       template&lt;typename _InputIterator&gt;
<span class="lineNum">     702 </span>                :         void
<span class="lineNum">     703 </span>                :         _M_insert_equal(_InputIterator __first, _InputIterator __last);
<span class="lineNum">     704 </span>                : 
<span class="lineNum">     705 </span>                :       void
<span class="lineNum">     706 </span>                :       erase(iterator __position);
<span class="lineNum">     707 </span>                : 
<span class="lineNum">     708 </span>                :       void
<span class="lineNum">     709 </span>                :       erase(const_iterator __position);
<span class="lineNum">     710 </span>                : 
<span class="lineNum">     711 </span>                :       size_type
<span class="lineNum">     712 </span>                :       erase(const key_type&amp; __x);
<span class="lineNum">     713 </span>                : 
<span class="lineNum">     714 </span>                :       void
<span class="lineNum">     715 </span>                :       erase(iterator __first, iterator __last);
<span class="lineNum">     716 </span>                : 
<span class="lineNum">     717 </span>                :       void
<span class="lineNum">     718 </span>                :       erase(const_iterator __first, const_iterator __last);
<span class="lineNum">     719 </span>                : 
<span class="lineNum">     720 </span>                :       void
<span class="lineNum">     721 </span>                :       erase(const key_type* __first, const key_type* __last);
<span class="lineNum">     722 </span>                : 
<span class="lineNum">     723 </span>                :       void
<span class="lineNum">     724 </span><span class="lineCov">              4 :       clear()</span>
<span class="lineNum">     725 </span>                :       {
<span class="lineNum">     726 </span><span class="lineCov">              4 :         _M_erase(_M_begin());</span>
<span class="lineNum">     727 </span><span class="lineCov">              4 :         _M_leftmost() = _M_end();</span>
<span class="lineNum">     728 </span><span class="lineCov">              4 :         _M_root() = 0;</span>
<span class="lineNum">     729 </span><span class="lineCov">              4 :         _M_rightmost() = _M_end();</span>
<span class="lineNum">     730 </span><span class="lineCov">              4 :         _M_impl._M_node_count = 0;</span>
<span class="lineNum">     731 </span><span class="lineCov">              4 :       }</span>
<span class="lineNum">     732 </span>                : 
<span class="lineNum">     733 </span>                :       // Set operations.
<span class="lineNum">     734 </span>                :       iterator
<span class="lineNum">     735 </span>                :       find(const key_type&amp; __k);
<span class="lineNum">     736 </span>                : 
<span class="lineNum">     737 </span>                :       const_iterator
<span class="lineNum">     738 </span>                :       find(const key_type&amp; __k) const;
<span class="lineNum">     739 </span>                : 
<span class="lineNum">     740 </span>                :       size_type
<span class="lineNum">     741 </span>                :       count(const key_type&amp; __k) const;
<span class="lineNum">     742 </span>                : 
<span class="lineNum">     743 </span>                :       iterator
<span class="lineNum">     744 </span><span class="lineCov">            130 :       lower_bound(const key_type&amp; __k)</span>
<span class="lineNum">     745 </span><span class="lineCov">            130 :       { return _M_lower_bound(_M_begin(), _M_end(), __k); }</span>
<span class="lineNum">     746 </span>                : 
<span class="lineNum">     747 </span>                :       const_iterator
<span class="lineNum">     748 </span>                :       lower_bound(const key_type&amp; __k) const
<span class="lineNum">     749 </span>                :       { return _M_lower_bound(_M_begin(), _M_end(), __k); }
<span class="lineNum">     750 </span>                : 
<span class="lineNum">     751 </span>                :       iterator
<span class="lineNum">     752 </span>                :       upper_bound(const key_type&amp; __k)
<span class="lineNum">     753 </span>                :       { return _M_upper_bound(_M_begin(), _M_end(), __k); }
<span class="lineNum">     754 </span>                : 
<span class="lineNum">     755 </span>                :       const_iterator
<span class="lineNum">     756 </span>                :       upper_bound(const key_type&amp; __k) const
<span class="lineNum">     757 </span>                :       { return _M_upper_bound(_M_begin(), _M_end(), __k); }
<span class="lineNum">     758 </span>                : 
<span class="lineNum">     759 </span>                :       pair&lt;iterator, iterator&gt;
<span class="lineNum">     760 </span>                :       equal_range(const key_type&amp; __k);
<span class="lineNum">     761 </span>                : 
<span class="lineNum">     762 </span>                :       pair&lt;const_iterator, const_iterator&gt;
<span class="lineNum">     763 </span>                :       equal_range(const key_type&amp; __k) const;
<span class="lineNum">     764 </span>                : 
<span class="lineNum">     765 </span>                :       // Debugging.
<span class="lineNum">     766 </span>                :       bool
<span class="lineNum">     767 </span>                :       __rb_verify() const;
<span class="lineNum">     768 </span>                :     };
<span class="lineNum">     769 </span>                : 
<span class="lineNum">     770 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     771 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     772 </span>                :     inline bool
<span class="lineNum">     773 </span>                :     operator==(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     774 </span>                :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     775 </span>                :     {
<span class="lineNum">     776 </span>                :       return __x.size() == __y.size()
<span class="lineNum">     777 </span>                :              &amp;&amp; std::equal(__x.begin(), __x.end(), __y.begin());
<span class="lineNum">     778 </span>                :     }
<span class="lineNum">     779 </span>                : 
<span class="lineNum">     780 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     781 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     782 </span>                :     inline bool
<span class="lineNum">     783 </span>                :     operator&lt;(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     784 </span>                :               const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     785 </span>                :     {
<span class="lineNum">     786 </span>                :       return std::lexicographical_compare(__x.begin(), __x.end(), 
<span class="lineNum">     787 </span>                :                                           __y.begin(), __y.end());
<span class="lineNum">     788 </span>                :     }
<span class="lineNum">     789 </span>                : 
<span class="lineNum">     790 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     791 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     792 </span>                :     inline bool
<span class="lineNum">     793 </span>                :     operator!=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     794 </span>                :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     795 </span>                :     { return !(__x == __y); }
<span class="lineNum">     796 </span>                : 
<span class="lineNum">     797 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     798 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     799 </span>                :     inline bool
<span class="lineNum">     800 </span>                :     operator&gt;(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     801 </span>                :               const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     802 </span>                :     { return __y &lt; __x; }
<span class="lineNum">     803 </span>                : 
<span class="lineNum">     804 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     805 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     806 </span>                :     inline bool
<span class="lineNum">     807 </span>                :     operator&lt;=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     808 </span>                :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     809 </span>                :     { return !(__y &lt; __x); }
<span class="lineNum">     810 </span>                : 
<span class="lineNum">     811 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     812 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     813 </span>                :     inline bool
<span class="lineNum">     814 </span>                :     operator&gt;=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     815 </span>                :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     816 </span>                :     { return !(__x &lt; __y); }
<span class="lineNum">     817 </span>                : 
<span class="lineNum">     818 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     819 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     820 </span>                :     inline void
<span class="lineNum">     821 </span>                :     swap(_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     822 </span>                :          _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     823 </span>                :     { __x.swap(__y); }
<span class="lineNum">     824 </span>                : 
<span class="lineNum">     825 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     826 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     827 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     828 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">     829 </span>                :     _Rb_tree(_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;&amp; __x)
<span class="lineNum">     830 </span>                :     : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
<span class="lineNum">     831 </span>                :     {
<span class="lineNum">     832 </span>                :       if (__x._M_root() != 0)
<span class="lineNum">     833 </span>                :         {
<span class="lineNum">     834 </span>                :           _M_root() = __x._M_root();
<span class="lineNum">     835 </span>                :           _M_leftmost() = __x._M_leftmost();
<span class="lineNum">     836 </span>                :           _M_rightmost() = __x._M_rightmost();
<span class="lineNum">     837 </span>                :           _M_root()-&gt;_M_parent = _M_end();
<span class="lineNum">     838 </span>                : 
<span class="lineNum">     839 </span>                :           __x._M_root() = 0;
<span class="lineNum">     840 </span>                :           __x._M_leftmost() = __x._M_end();
<span class="lineNum">     841 </span>                :           __x._M_rightmost() = __x._M_end();
<span class="lineNum">     842 </span>                : 
<span class="lineNum">     843 </span>                :           this-&gt;_M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">     844 </span>                :           __x._M_impl._M_node_count = 0;
<span class="lineNum">     845 </span>                :         }
<span class="lineNum">     846 </span>                :     }
<span class="lineNum">     847 </span>                : #endif
<span class="lineNum">     848 </span>                : 
<span class="lineNum">     849 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     850 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     851 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;
<span class="lineNum">     852 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">     853 </span>                :     operator=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x)
<span class="lineNum">     854 </span>                :     {
<span class="lineNum">     855 </span>                :       if (this != &amp;__x)
<span class="lineNum">     856 </span>                :         {
<span class="lineNum">     857 </span>                :           // Note that _Key may be a constant type.
<span class="lineNum">     858 </span>                :           clear();
<span class="lineNum">     859 </span>                :           _M_impl._M_key_compare = __x._M_impl._M_key_compare;
<span class="lineNum">     860 </span>                :           if (__x._M_root() != 0)
<span class="lineNum">     861 </span>                :             {
<span class="lineNum">     862 </span>                :               _M_root() = _M_copy(__x._M_begin(), _M_end());
<span class="lineNum">     863 </span>                :               _M_leftmost() = _S_minimum(_M_root());
<span class="lineNum">     864 </span>                :               _M_rightmost() = _S_maximum(_M_root());
<span class="lineNum">     865 </span>                :               _M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">     866 </span>                :             }
<span class="lineNum">     867 </span>                :         }
<span class="lineNum">     868 </span>                :       return *this;
<span class="lineNum">     869 </span>                :     }
<span class="lineNum">     870 </span>                : 
<span class="lineNum">     871 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     872 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     873 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">     874 </span><span class="lineCov">             62 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">     875 </span>                :     _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val&amp; __v)
<span class="lineNum">     876 </span>                :     {
<span class="lineNum">     877 </span>                :       bool __insert_left = (__x != 0 || __p == _M_end()
<span class="lineNum">     878 </span>                :                             || _M_impl._M_key_compare(_KeyOfValue()(__v), 
<span class="lineNum">     879 </span><span class="lineCov">             62 :                                                       _S_key(__p)));</span>
<span class="lineNum">     880 </span>                : 
<span class="lineNum">     881 </span><span class="lineCov">             62 :       _Link_type __z = _M_create_node(__v);</span>
<span class="lineNum">     882 </span>                : 
<span class="lineNum">     883 </span><span class="lineCov">             62 :       _Rb_tree_insert_and_rebalance(__insert_left, __z,</span>
<span class="lineNum">     884 </span>                :                                     const_cast&lt;_Base_ptr&gt;(__p),  
<span class="lineNum">     885 </span>                :                                     this-&gt;_M_impl._M_header);
<span class="lineNum">     886 </span><span class="lineCov">             62 :       ++_M_impl._M_node_count;</span>
<span class="lineNum">     887 </span><span class="lineCov">             62 :       return iterator(__z);</span>
<span class="lineNum">     888 </span>                :     }
<span class="lineNum">     889 </span>                : 
<span class="lineNum">     890 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     891 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     892 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">     893 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">     894 </span>                :     _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val&amp; __v)
<span class="lineNum">     895 </span>                :     {
<span class="lineNum">     896 </span>                :       bool __insert_left = (__x != 0 || __p == _M_end()
<span class="lineNum">     897 </span>                :                             || !_M_impl._M_key_compare(_S_key(__p),
<span class="lineNum">     898 </span>                :                                                        _KeyOfValue()(__v)));
<span class="lineNum">     899 </span>                : 
<span class="lineNum">     900 </span>                :       _Link_type __z = _M_create_node(__v);
<span class="lineNum">     901 </span>                : 
<span class="lineNum">     902 </span>                :       _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,  
<span class="lineNum">     903 </span>                :                                     this-&gt;_M_impl._M_header);
<span class="lineNum">     904 </span>                :       ++_M_impl._M_node_count;
<span class="lineNum">     905 </span>                :       return iterator(__z);
<span class="lineNum">     906 </span>                :     }
<span class="lineNum">     907 </span>                : 
<span class="lineNum">     908 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     909 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     910 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">     911 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">     912 </span>                :     _M_insert_equal_lower(const _Val&amp; __v)
<span class="lineNum">     913 </span>                :     {
<span class="lineNum">     914 </span>                :       _Link_type __x = _M_begin();
<span class="lineNum">     915 </span>                :       _Link_type __y = _M_end();
<span class="lineNum">     916 </span>                :       while (__x != 0)
<span class="lineNum">     917 </span>                :         {
<span class="lineNum">     918 </span>                :           __y = __x;
<span class="lineNum">     919 </span>                :           __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ?
<span class="lineNum">     920 </span>                :                 _S_left(__x) : _S_right(__x);
<span class="lineNum">     921 </span>                :         }
<span class="lineNum">     922 </span>                :       return _M_insert_lower(__x, __y, __v);
<span class="lineNum">     923 </span>                :     }
<span class="lineNum">     924 </span>                : 
<span class="lineNum">     925 </span>                :   template&lt;typename _Key, typename _Val, typename _KoV,
<span class="lineNum">     926 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     927 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KoV, _Compare, _Alloc&gt;::_Link_type
<span class="lineNum">     928 </span>                :     _Rb_tree&lt;_Key, _Val, _KoV, _Compare, _Alloc&gt;::
<span class="lineNum">     929 </span>                :     _M_copy(_Const_Link_type __x, _Link_type __p)
<span class="lineNum">     930 </span>                :     {
<span class="lineNum">     931 </span>                :       // Structural copy.  __x and __p must be non-null.
<span class="lineNum">     932 </span>                :       _Link_type __top = _M_clone_node(__x);
<span class="lineNum">     933 </span>                :       __top-&gt;_M_parent = __p;
<span class="lineNum">     934 </span>                : 
<span class="lineNum">     935 </span>                :       __try
<span class="lineNum">     936 </span>                :         {
<span class="lineNum">     937 </span>                :           if (__x-&gt;_M_right)
<span class="lineNum">     938 </span>                :             __top-&gt;_M_right = _M_copy(_S_right(__x), __top);
<span class="lineNum">     939 </span>                :           __p = __top;
<span class="lineNum">     940 </span>                :           __x = _S_left(__x);
<span class="lineNum">     941 </span>                : 
<span class="lineNum">     942 </span>                :           while (__x != 0)
<span class="lineNum">     943 </span>                :             {
<span class="lineNum">     944 </span>                :               _Link_type __y = _M_clone_node(__x);
<span class="lineNum">     945 </span>                :               __p-&gt;_M_left = __y;
<span class="lineNum">     946 </span>                :               __y-&gt;_M_parent = __p;
<span class="lineNum">     947 </span>                :               if (__x-&gt;_M_right)
<span class="lineNum">     948 </span>                :                 __y-&gt;_M_right = _M_copy(_S_right(__x), __y);
<span class="lineNum">     949 </span>                :               __p = __y;
<span class="lineNum">     950 </span>                :               __x = _S_left(__x);
<span class="lineNum">     951 </span>                :             }
<span class="lineNum">     952 </span>                :         }
<span class="lineNum">     953 </span>                :       __catch(...)
<span class="lineNum">     954 </span>                :         {
<span class="lineNum">     955 </span>                :           _M_erase(__top);
<span class="lineNum">     956 </span>                :           __throw_exception_again;
<span class="lineNum">     957 </span>                :         }
<span class="lineNum">     958 </span>                :       return __top;
<span class="lineNum">     959 </span>                :     }
<span class="lineNum">     960 </span>                : 
<span class="lineNum">     961 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     962 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     963 </span>                :     void
<span class="lineNum">     964 </span><span class="lineCov">             47 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">     965 </span>                :     _M_erase(_Link_type __x)
<span class="lineNum">     966 </span>                :     {
<span class="lineNum">     967 </span>                :       // Erase without rebalancing.
<span class="lineNum">     968 </span><span class="lineCov">            129 :       while (__x != 0)</span>
<span class="lineNum">     969 </span>                :         {
<span class="lineNum">     970 </span><span class="lineCov">             35 :           _M_erase(_S_right(__x));</span>
<span class="lineNum">     971 </span><span class="lineCov">             35 :           _Link_type __y = _S_left(__x);</span>
<span class="lineNum">     972 </span><span class="lineCov">             35 :           _M_destroy_node(__x);</span>
<span class="lineNum">     973 </span><span class="lineCov">             35 :           __x = __y;</span>
<span class="lineNum">     974 </span>                :         }
<span class="lineNum">     975 </span><span class="lineCov">             47 :     }</span>
<span class="lineNum">     976 </span>                : 
<span class="lineNum">     977 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     978 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     979 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">     980 </span>                :                       _Compare, _Alloc&gt;::iterator
<span class="lineNum">     981 </span><span class="lineCov">            141 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">     982 </span>                :     _M_lower_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">     983 </span>                :                    const _Key&amp; __k)
<span class="lineNum">     984 </span>                :     {
<span class="lineNum">     985 </span><span class="lineCov">            629 :       while (__x != 0)</span>
<span class="lineNum">     986 </span><span class="lineCov">            347 :         if (!_M_impl._M_key_compare(_S_key(__x), __k))</span>
<span class="lineNum">     987 </span><span class="lineCov">            153 :           __y = __x, __x = _S_left(__x);</span>
<span class="lineNum">     988 </span>                :         else
<span class="lineNum">     989 </span><span class="lineCov">            194 :           __x = _S_right(__x);</span>
<span class="lineNum">     990 </span><span class="lineCov">            141 :       return iterator(__y);</span>
<span class="lineNum">     991 </span>                :     }
<span class="lineNum">     992 </span>                : 
<span class="lineNum">     993 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     994 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">     995 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">     996 </span>                :                       _Compare, _Alloc&gt;::const_iterator
<span class="lineNum">     997 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">     998 </span>                :     _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">     999 </span>                :                    const _Key&amp; __k) const
<span class="lineNum">    1000 </span>                :     {
<span class="lineNum">    1001 </span>                :       while (__x != 0)
<span class="lineNum">    1002 </span>                :         if (!_M_impl._M_key_compare(_S_key(__x), __k))
<span class="lineNum">    1003 </span>                :           __y = __x, __x = _S_left(__x);
<span class="lineNum">    1004 </span>                :         else
<span class="lineNum">    1005 </span>                :           __x = _S_right(__x);
<span class="lineNum">    1006 </span>                :       return const_iterator(__y);
<span class="lineNum">    1007 </span>                :     }
<span class="lineNum">    1008 </span>                : 
<span class="lineNum">    1009 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1010 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1011 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1012 </span>                :                       _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1013 </span><span class="lineCov">             11 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1014 </span>                :     _M_upper_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">    1015 </span>                :                    const _Key&amp; __k)
<span class="lineNum">    1016 </span>                :     {
<span class="lineNum">    1017 </span><span class="lineCov">             26 :       while (__x != 0)</span>
<span class="lineNum">    1018 </span><span class="lineCov">              4 :         if (_M_impl._M_key_compare(__k, _S_key(__x)))</span>
<span class="lineNum">    1019 </span><span class="lineCov">              4 :           __y = __x, __x = _S_left(__x);</span>
<span class="lineNum">    1020 </span>                :         else
<span class="lineNum">    1021 </span><span class="lineNoCov">              0 :           __x = _S_right(__x);</span>
<span class="lineNum">    1022 </span><span class="lineCov">             11 :       return iterator(__y);</span>
<span class="lineNum">    1023 </span>                :     }
<span class="lineNum">    1024 </span>                : 
<span class="lineNum">    1025 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1026 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1027 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1028 </span>                :                       _Compare, _Alloc&gt;::const_iterator
<span class="lineNum">    1029 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1030 </span>                :     _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">    1031 </span>                :                    const _Key&amp; __k) const
<span class="lineNum">    1032 </span>                :     {
<span class="lineNum">    1033 </span>                :       while (__x != 0)
<span class="lineNum">    1034 </span>                :         if (_M_impl._M_key_compare(__k, _S_key(__x)))
<span class="lineNum">    1035 </span>                :           __y = __x, __x = _S_left(__x);
<span class="lineNum">    1036 </span>                :         else
<span class="lineNum">    1037 </span>                :           __x = _S_right(__x);
<span class="lineNum">    1038 </span>                :       return const_iterator(__y);
<span class="lineNum">    1039 </span>                :     }
<span class="lineNum">    1040 </span>                : 
<span class="lineNum">    1041 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1042 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1043 </span>                :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1044 </span>                :                            _Compare, _Alloc&gt;::iterator,
<span class="lineNum">    1045 </span>                :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1046 </span>                :                            _Compare, _Alloc&gt;::iterator&gt;
<span class="lineNum">    1047 </span><span class="lineCov">             11 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1048 </span>                :     equal_range(const _Key&amp; __k)
<span class="lineNum">    1049 </span>                :     {
<span class="lineNum">    1050 </span><span class="lineCov">             11 :       _Link_type __x = _M_begin();</span>
<span class="lineNum">    1051 </span><span class="lineCov">             11 :       _Link_type __y = _M_end();</span>
<span class="lineNum">    1052 </span><span class="lineCov">             29 :       while (__x != 0)</span>
<span class="lineNum">    1053 </span>                :         {
<span class="lineNum">    1054 </span><span class="lineCov">             18 :           if (_M_impl._M_key_compare(_S_key(__x), __k))</span>
<span class="lineNum">    1055 </span><span class="lineNoCov">              0 :             __x = _S_right(__x);</span>
<span class="lineNum">    1056 </span><span class="lineCov">             18 :           else if (_M_impl._M_key_compare(__k, _S_key(__x)))</span>
<span class="lineNum">    1057 </span><span class="lineCov">              7 :             __y = __x, __x = _S_left(__x);</span>
<span class="lineNum">    1058 </span>                :           else
<span class="lineNum">    1059 </span>                :             {
<span class="lineNum">    1060 </span><span class="lineCov">             11 :               _Link_type __xu(__x), __yu(__y);</span>
<span class="lineNum">    1061 </span><span class="lineCov">             11 :               __y = __x, __x = _S_left(__x);</span>
<span class="lineNum">    1062 </span><span class="lineCov">             11 :               __xu = _S_right(__xu);</span>
<span class="lineNum">    1063 </span>                :               return pair&lt;iterator,
<span class="lineNum">    1064 </span>                :                           iterator&gt;(_M_lower_bound(__x, __y, __k),
<span class="lineNum">    1065 </span><span class="lineCov">             11 :                                     _M_upper_bound(__xu, __yu, __k));</span>
<span class="lineNum">    1066 </span>                :             }
<span class="lineNum">    1067 </span>                :         }
<span class="lineNum">    1068 </span>                :       return pair&lt;iterator, iterator&gt;(iterator(__y),
<span class="lineNum">    1069 </span><span class="lineNoCov">              0 :                                       iterator(__y));</span>
<span class="lineNum">    1070 </span>                :     }
<span class="lineNum">    1071 </span>                : 
<span class="lineNum">    1072 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1073 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1074 </span>                :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1075 </span>                :                            _Compare, _Alloc&gt;::const_iterator,
<span class="lineNum">    1076 </span>                :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1077 </span>                :                            _Compare, _Alloc&gt;::const_iterator&gt;
<span class="lineNum">    1078 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1079 </span>                :     equal_range(const _Key&amp; __k) const
<span class="lineNum">    1080 </span>                :     {
<span class="lineNum">    1081 </span>                :       _Const_Link_type __x = _M_begin();
<span class="lineNum">    1082 </span>                :       _Const_Link_type __y = _M_end();
<span class="lineNum">    1083 </span>                :       while (__x != 0)
<span class="lineNum">    1084 </span>                :         {
<span class="lineNum">    1085 </span>                :           if (_M_impl._M_key_compare(_S_key(__x), __k))
<span class="lineNum">    1086 </span>                :             __x = _S_right(__x);
<span class="lineNum">    1087 </span>                :           else if (_M_impl._M_key_compare(__k, _S_key(__x)))
<span class="lineNum">    1088 </span>                :             __y = __x, __x = _S_left(__x);
<span class="lineNum">    1089 </span>                :           else
<span class="lineNum">    1090 </span>                :             {
<span class="lineNum">    1091 </span>                :               _Const_Link_type __xu(__x), __yu(__y);
<span class="lineNum">    1092 </span>                :               __y = __x, __x = _S_left(__x);
<span class="lineNum">    1093 </span>                :               __xu = _S_right(__xu);
<span class="lineNum">    1094 </span>                :               return pair&lt;const_iterator,
<span class="lineNum">    1095 </span>                :                           const_iterator&gt;(_M_lower_bound(__x, __y, __k),
<span class="lineNum">    1096 </span>                :                                           _M_upper_bound(__xu, __yu, __k));
<span class="lineNum">    1097 </span>                :             }
<span class="lineNum">    1098 </span>                :         }
<span class="lineNum">    1099 </span>                :       return pair&lt;const_iterator, const_iterator&gt;(const_iterator(__y),
<span class="lineNum">    1100 </span>                :                                                   const_iterator(__y));
<span class="lineNum">    1101 </span>                :     }
<span class="lineNum">    1102 </span>                : 
<span class="lineNum">    1103 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1104 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1105 </span>                :     void
<span class="lineNum">    1106 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1107 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">    1108 </span>                :     swap(_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;&amp; __t)
<span class="lineNum">    1109 </span>                : #else
<span class="lineNum">    1110 </span>                :     swap(_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __t)
<span class="lineNum">    1111 </span>                : #endif
<span class="lineNum">    1112 </span>                :     {
<span class="lineNum">    1113 </span>                :       if (_M_root() == 0)
<span class="lineNum">    1114 </span>                :         {
<span class="lineNum">    1115 </span>                :           if (__t._M_root() != 0)
<span class="lineNum">    1116 </span>                :             {
<span class="lineNum">    1117 </span>                :               _M_root() = __t._M_root();
<span class="lineNum">    1118 </span>                :               _M_leftmost() = __t._M_leftmost();
<span class="lineNum">    1119 </span>                :               _M_rightmost() = __t._M_rightmost();
<span class="lineNum">    1120 </span>                :               _M_root()-&gt;_M_parent = _M_end();
<span class="lineNum">    1121 </span>                :               
<span class="lineNum">    1122 </span>                :               __t._M_root() = 0;
<span class="lineNum">    1123 </span>                :               __t._M_leftmost() = __t._M_end();
<span class="lineNum">    1124 </span>                :               __t._M_rightmost() = __t._M_end();
<span class="lineNum">    1125 </span>                :             }
<span class="lineNum">    1126 </span>                :         }
<span class="lineNum">    1127 </span>                :       else if (__t._M_root() == 0)
<span class="lineNum">    1128 </span>                :         {
<span class="lineNum">    1129 </span>                :           __t._M_root() = _M_root();
<span class="lineNum">    1130 </span>                :           __t._M_leftmost() = _M_leftmost();
<span class="lineNum">    1131 </span>                :           __t._M_rightmost() = _M_rightmost();
<span class="lineNum">    1132 </span>                :           __t._M_root()-&gt;_M_parent = __t._M_end();
<span class="lineNum">    1133 </span>                :           
<span class="lineNum">    1134 </span>                :           _M_root() = 0;
<span class="lineNum">    1135 </span>                :           _M_leftmost() = _M_end();
<span class="lineNum">    1136 </span>                :           _M_rightmost() = _M_end();
<span class="lineNum">    1137 </span>                :         }
<span class="lineNum">    1138 </span>                :       else
<span class="lineNum">    1139 </span>                :         {
<span class="lineNum">    1140 </span>                :           std::swap(_M_root(),__t._M_root());
<span class="lineNum">    1141 </span>                :           std::swap(_M_leftmost(),__t._M_leftmost());
<span class="lineNum">    1142 </span>                :           std::swap(_M_rightmost(),__t._M_rightmost());
<span class="lineNum">    1143 </span>                :           
<span class="lineNum">    1144 </span>                :           _M_root()-&gt;_M_parent = _M_end();
<span class="lineNum">    1145 </span>                :           __t._M_root()-&gt;_M_parent = __t._M_end();
<span class="lineNum">    1146 </span>                :         }
<span class="lineNum">    1147 </span>                :       // No need to swap header's color as it does not change.
<span class="lineNum">    1148 </span>                :       std::swap(this-&gt;_M_impl._M_node_count, __t._M_impl._M_node_count);
<span class="lineNum">    1149 </span>                :       std::swap(this-&gt;_M_impl._M_key_compare, __t._M_impl._M_key_compare);
<span class="lineNum">    1150 </span>                :       
<span class="lineNum">    1151 </span>                :       // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">    1152 </span>                :       // 431. Swapping containers with unequal allocators.
<span class="lineNum">    1153 </span>                :       std::__alloc_swap&lt;_Node_allocator&gt;::
<span class="lineNum">    1154 </span>                :         _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator());
<span class="lineNum">    1155 </span>                :     }
<span class="lineNum">    1156 </span>                : 
<span class="lineNum">    1157 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1158 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1159 </span>                :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1160 </span>                :                            _Compare, _Alloc&gt;::iterator, bool&gt;
<span class="lineNum">    1161 </span><span class="lineCov">             21 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1162 </span>                :     _M_insert_unique(const _Val&amp; __v)
<span class="lineNum">    1163 </span>                :     {
<span class="lineNum">    1164 </span><span class="lineCov">             21 :       _Link_type __x = _M_begin();</span>
<span class="lineNum">    1165 </span><span class="lineCov">             21 :       _Link_type __y = _M_end();</span>
<span class="lineNum">    1166 </span><span class="lineCov">             21 :       bool __comp = true;</span>
<span class="lineNum">    1167 </span><span class="lineCov">             64 :       while (__x != 0)</span>
<span class="lineNum">    1168 </span>                :         {
<span class="lineNum">    1169 </span><span class="lineCov">             22 :           __y = __x;</span>
<span class="lineNum">    1170 </span><span class="lineCov">             22 :           __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x));</span>
<span class="lineNum">    1171 </span><span class="lineCov">             22 :           __x = __comp ? _S_left(__x) : _S_right(__x);</span>
<span class="lineNum">    1172 </span>                :         }
<span class="lineNum">    1173 </span><span class="lineCov">             21 :       iterator __j = iterator(__y);</span>
<span class="lineNum">    1174 </span><span class="lineCov">             21 :       if (__comp)</span>
<span class="lineNum">    1175 </span>                :         {
<span class="lineNum">    1176 </span><span class="lineCov">             10 :           if (__j == begin())</span>
<span class="lineNum">    1177 </span><span class="lineCov">             10 :             return pair&lt;iterator, bool&gt;(_M_insert_(__x, __y, __v), true);</span>
<span class="lineNum">    1178 </span>                :           else
<span class="lineNum">    1179 </span><span class="lineNoCov">              0 :             --__j;</span>
<span class="lineNum">    1180 </span>                :         }
<span class="lineNum">    1181 </span><span class="lineCov">             11 :       if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))</span>
<span class="lineNum">    1182 </span><span class="lineCov">             11 :         return pair&lt;iterator, bool&gt;(_M_insert_(__x, __y, __v), true);</span>
<span class="lineNum">    1183 </span><span class="lineNoCov">              0 :       return pair&lt;iterator, bool&gt;(__j, false);</span>
<span class="lineNum">    1184 </span>                :     }
<span class="lineNum">    1185 </span>                : 
<span class="lineNum">    1186 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1187 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1188 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1189 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1190 </span>                :     _M_insert_equal(const _Val&amp; __v)
<span class="lineNum">    1191 </span>                :     {
<span class="lineNum">    1192 </span>                :       _Link_type __x = _M_begin();
<span class="lineNum">    1193 </span>                :       _Link_type __y = _M_end();
<span class="lineNum">    1194 </span>                :       while (__x != 0)
<span class="lineNum">    1195 </span>                :         {
<span class="lineNum">    1196 </span>                :           __y = __x;
<span class="lineNum">    1197 </span>                :           __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ?
<span class="lineNum">    1198 </span>                :                 _S_left(__x) : _S_right(__x);
<span class="lineNum">    1199 </span>                :         }
<span class="lineNum">    1200 </span>                :       return _M_insert_(__x, __y, __v);
<span class="lineNum">    1201 </span>                :     }
<span class="lineNum">    1202 </span>                : 
<span class="lineNum">    1203 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1204 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1205 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1206 </span><span class="lineCov">             47 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1207 </span>                :     _M_insert_unique_(const_iterator __position, const _Val&amp; __v)
<span class="lineNum">    1208 </span>                :     {
<span class="lineNum">    1209 </span>                :       // end()
<span class="lineNum">    1210 </span><span class="lineCov">             47 :       if (__position._M_node == _M_end())</span>
<span class="lineNum">    1211 </span>                :         {
<span class="lineNum">    1212 </span><span class="lineCov">             23 :           if (size() &gt; 0</span>
<span class="lineNum">    1213 </span>                :               &amp;&amp; _M_impl._M_key_compare(_S_key(_M_rightmost()), 
<span class="lineNum">    1214 </span>                :                                         _KeyOfValue()(__v)))
<span class="lineNum">    1215 </span><span class="lineCov">             17 :             return _M_insert_(0, _M_rightmost(), __v);</span>
<span class="lineNum">    1216 </span>                :           else
<span class="lineNum">    1217 </span><span class="lineCov">              6 :             return _M_insert_unique(__v).first;</span>
<span class="lineNum">    1218 </span>                :         }
<span class="lineNum">    1219 </span><span class="lineCov">             24 :       else if (_M_impl._M_key_compare(_KeyOfValue()(__v),</span>
<span class="lineNum">    1220 </span>                :                                       _S_key(__position._M_node)))
<span class="lineNum">    1221 </span>                :         {
<span class="lineNum">    1222 </span>                :           // First, try before...
<span class="lineNum">    1223 </span><span class="lineCov">             24 :           const_iterator __before = __position;</span>
<span class="lineNum">    1224 </span><span class="lineCov">             24 :           if (__position._M_node == _M_leftmost()) // begin()</span>
<span class="lineNum">    1225 </span><span class="lineCov">              4 :             return _M_insert_(_M_leftmost(), _M_leftmost(), __v);</span>
<span class="lineNum">    1226 </span><span class="lineCov">             20 :           else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), </span>
<span class="lineNum">    1227 </span>                :                                           _KeyOfValue()(__v)))
<span class="lineNum">    1228 </span>                :             {
<span class="lineNum">    1229 </span><span class="lineCov">             20 :               if (_S_right(__before._M_node) == 0)</span>
<span class="lineNum">    1230 </span><span class="lineCov">              8 :                 return _M_insert_(0, __before._M_node, __v);</span>
<span class="lineNum">    1231 </span>                :               else
<span class="lineNum">    1232 </span>                :                 return _M_insert_(__position._M_node,
<span class="lineNum">    1233 </span><span class="lineCov">             12 :                                   __position._M_node, __v);</span>
<span class="lineNum">    1234 </span>                :             }
<span class="lineNum">    1235 </span>                :           else
<span class="lineNum">    1236 </span><span class="lineNoCov">              0 :             return _M_insert_unique(__v).first;</span>
<span class="lineNum">    1237 </span>                :         }
<span class="lineNum">    1238 </span><span class="lineNoCov">              0 :       else if (_M_impl._M_key_compare(_S_key(__position._M_node),</span>
<span class="lineNum">    1239 </span>                :                                       _KeyOfValue()(__v)))
<span class="lineNum">    1240 </span>                :         {
<span class="lineNum">    1241 </span>                :           // ... then try after.
<span class="lineNum">    1242 </span><span class="lineNoCov">              0 :           const_iterator __after = __position;</span>
<span class="lineNum">    1243 </span><span class="lineNoCov">              0 :           if (__position._M_node == _M_rightmost())</span>
<span class="lineNum">    1244 </span><span class="lineNoCov">              0 :             return _M_insert_(0, _M_rightmost(), __v);</span>
<span class="lineNum">    1245 </span><span class="lineNoCov">              0 :           else if (_M_impl._M_key_compare(_KeyOfValue()(__v),</span>
<span class="lineNum">    1246 </span>                :                                           _S_key((++__after)._M_node)))
<span class="lineNum">    1247 </span>                :             {
<span class="lineNum">    1248 </span><span class="lineNoCov">              0 :               if (_S_right(__position._M_node) == 0)</span>
<span class="lineNum">    1249 </span><span class="lineNoCov">              0 :                 return _M_insert_(0, __position._M_node, __v);</span>
<span class="lineNum">    1250 </span>                :               else
<span class="lineNum">    1251 </span><span class="lineNoCov">              0 :                 return _M_insert_(__after._M_node, __after._M_node, __v);</span>
<span class="lineNum">    1252 </span>                :             }
<span class="lineNum">    1253 </span>                :           else
<span class="lineNum">    1254 </span><span class="lineNoCov">              0 :             return _M_insert_unique(__v).first;</span>
<span class="lineNum">    1255 </span>                :         }
<span class="lineNum">    1256 </span>                :       else
<span class="lineNum">    1257 </span>                :         // Equivalent keys.
<span class="lineNum">    1258 </span>                :         return iterator(static_cast&lt;_Link_type&gt;
<span class="lineNum">    1259 </span><span class="lineNoCov">              0 :                         (const_cast&lt;_Base_ptr&gt;(__position._M_node)));</span>
<span class="lineNum">    1260 </span>                :     }
<span class="lineNum">    1261 </span>                : 
<span class="lineNum">    1262 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1263 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1264 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1265 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1266 </span>                :     _M_insert_equal_(const_iterator __position, const _Val&amp; __v)
<span class="lineNum">    1267 </span>                :     {
<span class="lineNum">    1268 </span>                :       // end()
<span class="lineNum">    1269 </span>                :       if (__position._M_node == _M_end())
<span class="lineNum">    1270 </span>                :         {
<span class="lineNum">    1271 </span>                :           if (size() &gt; 0
<span class="lineNum">    1272 </span>                :               &amp;&amp; !_M_impl._M_key_compare(_KeyOfValue()(__v),
<span class="lineNum">    1273 </span>                :                                          _S_key(_M_rightmost())))
<span class="lineNum">    1274 </span>                :             return _M_insert_(0, _M_rightmost(), __v);
<span class="lineNum">    1275 </span>                :           else
<span class="lineNum">    1276 </span>                :             return _M_insert_equal(__v);
<span class="lineNum">    1277 </span>                :         }
<span class="lineNum">    1278 </span>                :       else if (!_M_impl._M_key_compare(_S_key(__position._M_node),
<span class="lineNum">    1279 </span>                :                                        _KeyOfValue()(__v)))
<span class="lineNum">    1280 </span>                :         {
<span class="lineNum">    1281 </span>                :           // First, try before...
<span class="lineNum">    1282 </span>                :           const_iterator __before = __position;
<span class="lineNum">    1283 </span>                :           if (__position._M_node == _M_leftmost()) // begin()
<span class="lineNum">    1284 </span>                :             return _M_insert_(_M_leftmost(), _M_leftmost(), __v);
<span class="lineNum">    1285 </span>                :           else if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
<span class="lineNum">    1286 </span>                :                                            _S_key((--__before)._M_node)))
<span class="lineNum">    1287 </span>                :             {
<span class="lineNum">    1288 </span>                :               if (_S_right(__before._M_node) == 0)
<span class="lineNum">    1289 </span>                :                 return _M_insert_(0, __before._M_node, __v);
<span class="lineNum">    1290 </span>                :               else
<span class="lineNum">    1291 </span>                :                 return _M_insert_(__position._M_node,
<span class="lineNum">    1292 </span>                :                                   __position._M_node, __v);
<span class="lineNum">    1293 </span>                :             }
<span class="lineNum">    1294 </span>                :           else
<span class="lineNum">    1295 </span>                :             return _M_insert_equal(__v);
<span class="lineNum">    1296 </span>                :         }
<span class="lineNum">    1297 </span>                :       else
<span class="lineNum">    1298 </span>                :         {
<span class="lineNum">    1299 </span>                :           // ... then try after.  
<span class="lineNum">    1300 </span>                :           const_iterator __after = __position;
<span class="lineNum">    1301 </span>                :           if (__position._M_node == _M_rightmost())
<span class="lineNum">    1302 </span>                :             return _M_insert_(0, _M_rightmost(), __v);
<span class="lineNum">    1303 </span>                :           else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node),
<span class="lineNum">    1304 </span>                :                                            _KeyOfValue()(__v)))
<span class="lineNum">    1305 </span>                :             {
<span class="lineNum">    1306 </span>                :               if (_S_right(__position._M_node) == 0)
<span class="lineNum">    1307 </span>                :                 return _M_insert_(0, __position._M_node, __v);
<span class="lineNum">    1308 </span>                :               else
<span class="lineNum">    1309 </span>                :                 return _M_insert_(__after._M_node, __after._M_node, __v);
<span class="lineNum">    1310 </span>                :             }
<span class="lineNum">    1311 </span>                :           else
<span class="lineNum">    1312 </span>                :             return _M_insert_equal_lower(__v);
<span class="lineNum">    1313 </span>                :         }
<span class="lineNum">    1314 </span>                :     }
<span class="lineNum">    1315 </span>                : 
<span class="lineNum">    1316 </span>                :   template&lt;typename _Key, typename _Val, typename _KoV,
<span class="lineNum">    1317 </span>                :            typename _Cmp, typename _Alloc&gt;
<span class="lineNum">    1318 </span>                :     template&lt;class _II&gt;
<span class="lineNum">    1319 </span>                :       void
<span class="lineNum">    1320 </span>                :       _Rb_tree&lt;_Key, _Val, _KoV, _Cmp, _Alloc&gt;::
<span class="lineNum">    1321 </span>                :       _M_insert_unique(_II __first, _II __last)
<span class="lineNum">    1322 </span>                :       {
<span class="lineNum">    1323 </span>                :         for (; __first != __last; ++__first)
<span class="lineNum">    1324 </span>                :           _M_insert_unique_(end(), *__first);
<span class="lineNum">    1325 </span>                :       }
<span class="lineNum">    1326 </span>                : 
<span class="lineNum">    1327 </span>                :   template&lt;typename _Key, typename _Val, typename _KoV,
<span class="lineNum">    1328 </span>                :            typename _Cmp, typename _Alloc&gt;
<span class="lineNum">    1329 </span>                :     template&lt;class _II&gt;
<span class="lineNum">    1330 </span>                :       void
<span class="lineNum">    1331 </span>                :       _Rb_tree&lt;_Key, _Val, _KoV, _Cmp, _Alloc&gt;::
<span class="lineNum">    1332 </span>                :       _M_insert_equal(_II __first, _II __last)
<span class="lineNum">    1333 </span>                :       {
<span class="lineNum">    1334 </span>                :         for (; __first != __last; ++__first)
<span class="lineNum">    1335 </span>                :           _M_insert_equal_(end(), *__first);
<span class="lineNum">    1336 </span>                :       }
<span class="lineNum">    1337 </span>                : 
<span class="lineNum">    1338 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1339 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1340 </span>                :     inline void
<span class="lineNum">    1341 </span><span class="lineCov">              9 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1342 </span>                :     erase(iterator __position)
<span class="lineNum">    1343 </span>                :     {
<span class="lineNum">    1344 </span>                :       _Link_type __y =
<span class="lineNum">    1345 </span>                :         static_cast&lt;_Link_type&gt;(_Rb_tree_rebalance_for_erase
<span class="lineNum">    1346 </span>                :                                 (__position._M_node,
<span class="lineNum">    1347 </span><span class="lineCov">              9 :                                  this-&gt;_M_impl._M_header));</span>
<span class="lineNum">    1348 </span><span class="lineCov">              9 :       _M_destroy_node(__y);</span>
<span class="lineNum">    1349 </span><span class="lineCov">              9 :       --_M_impl._M_node_count;</span>
<span class="lineNum">    1350 </span><span class="lineCov">              9 :     }</span>
<span class="lineNum">    1351 </span>                : 
<span class="lineNum">    1352 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1353 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1354 </span>                :     inline void
<span class="lineNum">    1355 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1356 </span>                :     erase(const_iterator __position)
<span class="lineNum">    1357 </span>                :     {
<span class="lineNum">    1358 </span>                :       _Link_type __y =
<span class="lineNum">    1359 </span>                :         static_cast&lt;_Link_type&gt;(_Rb_tree_rebalance_for_erase
<span class="lineNum">    1360 </span>                :                                 (const_cast&lt;_Base_ptr&gt;(__position._M_node),
<span class="lineNum">    1361 </span>                :                                  this-&gt;_M_impl._M_header));
<span class="lineNum">    1362 </span>                :       _M_destroy_node(__y);
<span class="lineNum">    1363 </span>                :       --_M_impl._M_node_count;
<span class="lineNum">    1364 </span>                :     }
<span class="lineNum">    1365 </span>                : 
<span class="lineNum">    1366 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1367 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1368 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::size_type
<span class="lineNum">    1369 </span><span class="lineCov">             11 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1370 </span>                :     erase(const _Key&amp; __x)
<span class="lineNum">    1371 </span>                :     {
<span class="lineNum">    1372 </span><span class="lineCov">             11 :       pair&lt;iterator, iterator&gt; __p = equal_range(__x);</span>
<span class="lineNum">    1373 </span><span class="lineCov">             11 :       const size_type __old_size = size();</span>
<span class="lineNum">    1374 </span><span class="lineCov">             11 :       erase(__p.first, __p.second);</span>
<span class="lineNum">    1375 </span><span class="lineCov">             11 :       return __old_size - size();</span>
<span class="lineNum">    1376 </span>                :     }
<span class="lineNum">    1377 </span>                : 
<span class="lineNum">    1378 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1379 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1380 </span>                :     void
<span class="lineNum">    1381 </span><span class="lineCov">             11 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1382 </span>                :     erase(iterator __first, iterator __last)
<span class="lineNum">    1383 </span>                :     {
<span class="lineNum">    1384 </span><span class="lineCov">             11 :       if (__first == begin() &amp;&amp; __last == end())</span>
<span class="lineNum">    1385 </span><span class="lineCov">              2 :         clear();</span>
<span class="lineNum">    1386 </span>                :       else
<span class="lineNum">    1387 </span><span class="lineCov">             27 :         while (__first != __last)</span>
<span class="lineNum">    1388 </span><span class="lineCov">              9 :           erase(__first++);</span>
<span class="lineNum">    1389 </span><span class="lineCov">             11 :     }</span>
<span class="lineNum">    1390 </span>                : 
<span class="lineNum">    1391 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1392 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1393 </span>                :     void
<span class="lineNum">    1394 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1395 </span>                :     erase(const_iterator __first, const_iterator __last)
<span class="lineNum">    1396 </span>                :     {
<span class="lineNum">    1397 </span>                :       if (__first == begin() &amp;&amp; __last == end())
<span class="lineNum">    1398 </span>                :         clear();
<span class="lineNum">    1399 </span>                :       else
<span class="lineNum">    1400 </span>                :         while (__first != __last)
<span class="lineNum">    1401 </span>                :           erase(__first++);
<span class="lineNum">    1402 </span>                :     }
<span class="lineNum">    1403 </span>                : 
<span class="lineNum">    1404 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1405 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1406 </span>                :     void
<span class="lineNum">    1407 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1408 </span>                :     erase(const _Key* __first, const _Key* __last)
<span class="lineNum">    1409 </span>                :     {
<span class="lineNum">    1410 </span>                :       while (__first != __last)
<span class="lineNum">    1411 </span>                :         erase(*__first++);
<span class="lineNum">    1412 </span>                :     }
<span class="lineNum">    1413 </span>                : 
<span class="lineNum">    1414 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1415 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1416 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1417 </span>                :                       _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1418 </span><span class="lineNoCov">              0 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1419 </span>                :     find(const _Key&amp; __k)
<span class="lineNum">    1420 </span>                :     {
<span class="lineNum">    1421 </span><span class="lineNoCov">              0 :       iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);</span>
<span class="lineNum">    1422 </span>                :       return (__j == end()
<span class="lineNum">    1423 </span>                :               || _M_impl._M_key_compare(__k,
<span class="lineNum">    1424 </span><span class="lineNoCov">              0 :                                         _S_key(__j._M_node))) ? end() : __j;</span>
<span class="lineNum">    1425 </span>                :     }
<span class="lineNum">    1426 </span>                : 
<span class="lineNum">    1427 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1428 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1429 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1430 </span>                :                       _Compare, _Alloc&gt;::const_iterator
<span class="lineNum">    1431 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1432 </span>                :     find(const _Key&amp; __k) const
<span class="lineNum">    1433 </span>                :     {
<span class="lineNum">    1434 </span>                :       const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);
<span class="lineNum">    1435 </span>                :       return (__j == end()
<span class="lineNum">    1436 </span>                :               || _M_impl._M_key_compare(__k, 
<span class="lineNum">    1437 </span>                :                                         _S_key(__j._M_node))) ? end() : __j;
<span class="lineNum">    1438 </span>                :     }
<span class="lineNum">    1439 </span>                : 
<span class="lineNum">    1440 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1441 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1442 </span>                :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::size_type
<span class="lineNum">    1443 </span>                :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1444 </span>                :     count(const _Key&amp; __k) const
<span class="lineNum">    1445 </span>                :     {
<span class="lineNum">    1446 </span>                :       pair&lt;const_iterator, const_iterator&gt; __p = equal_range(__k);
<span class="lineNum">    1447 </span>                :       const size_type __n = std::distance(__p.first, __p.second);
<span class="lineNum">    1448 </span>                :       return __n;
<span class="lineNum">    1449 </span>                :     }
<span class="lineNum">    1450 </span>                : 
<span class="lineNum">    1451 </span>                :   unsigned int
<span class="lineNum">    1452 </span>                :   _Rb_tree_black_count(const _Rb_tree_node_base* __node,
<span class="lineNum">    1453 </span>                :                        const _Rb_tree_node_base* __root);
<span class="lineNum">    1454 </span>                : 
<span class="lineNum">    1455 </span>                :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1456 </span>                :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1457 </span>                :     bool
<span class="lineNum">    1458 </span>                :     _Rb_tree&lt;_Key,_Val,_KeyOfValue,_Compare,_Alloc&gt;::__rb_verify() const
<span class="lineNum">    1459 </span>                :     {
<span class="lineNum">    1460 </span>                :       if (_M_impl._M_node_count == 0 || begin() == end())
<span class="lineNum">    1461 </span>                :         return _M_impl._M_node_count == 0 &amp;&amp; begin() == end()
<span class="lineNum">    1462 </span>                :                &amp;&amp; this-&gt;_M_impl._M_header._M_left == _M_end()
<span class="lineNum">    1463 </span>                :                &amp;&amp; this-&gt;_M_impl._M_header._M_right == _M_end();
<span class="lineNum">    1464 </span>                : 
<span class="lineNum">    1465 </span>                :       unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root());
<span class="lineNum">    1466 </span>                :       for (const_iterator __it = begin(); __it != end(); ++__it)
<span class="lineNum">    1467 </span>                :         {
<span class="lineNum">    1468 </span>                :           _Const_Link_type __x = static_cast&lt;_Const_Link_type&gt;(__it._M_node);
<span class="lineNum">    1469 </span>                :           _Const_Link_type __L = _S_left(__x);
<span class="lineNum">    1470 </span>                :           _Const_Link_type __R = _S_right(__x);
<span class="lineNum">    1471 </span>                : 
<span class="lineNum">    1472 </span>                :           if (__x-&gt;_M_color == _S_red)
<span class="lineNum">    1473 </span>                :             if ((__L &amp;&amp; __L-&gt;_M_color == _S_red)
<span class="lineNum">    1474 </span>                :                 || (__R &amp;&amp; __R-&gt;_M_color == _S_red))
<span class="lineNum">    1475 </span>                :               return false;
<span class="lineNum">    1476 </span>                : 
<span class="lineNum">    1477 </span>                :           if (__L &amp;&amp; _M_impl._M_key_compare(_S_key(__x), _S_key(__L)))
<span class="lineNum">    1478 </span>                :             return false;
<span class="lineNum">    1479 </span>                :           if (__R &amp;&amp; _M_impl._M_key_compare(_S_key(__R), _S_key(__x)))
<span class="lineNum">    1480 </span>                :             return false;
<span class="lineNum">    1481 </span>                : 
<span class="lineNum">    1482 </span>                :           if (!__L &amp;&amp; !__R &amp;&amp; _Rb_tree_black_count(__x, _M_root()) != __len)
<span class="lineNum">    1483 </span>                :             return false;
<span class="lineNum">    1484 </span>                :         }
<span class="lineNum">    1485 </span>                : 
<span class="lineNum">    1486 </span>                :       if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
<span class="lineNum">    1487 </span>                :         return false;
<span class="lineNum">    1488 </span>                :       if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
<span class="lineNum">    1489 </span>                :         return false;
<span class="lineNum">    1490 </span>                :       return true;
<span class="lineNum">    1491 </span>                :     }
<span class="lineNum">    1492 </span>                : 
<span class="lineNum">    1493 </span>                : _GLIBCXX_END_NAMESPACE
<span class="lineNum">    1494 </span>                : 
<span class="lineNum">    1495 </span>                : #endif
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
